[google-appengine] Re: Cost of updating list property

2013-01-25 Thread Ryan Chazen
Depends if those integers are indexed or not. Each index is a write op.
However, an entity can only be 1mb big.. I think 1 million integers would 
be more than 1mb as appengine stores natively as strings...

What you could try is to store the integers in multiple entities (say 
1-1000 integers per entity). That would make adding new integers easy as 
you would not need to modify old entities. You could join all the integers 
back together if needed with a query.

On Friday, January 25, 2013 8:32:48 PM UTC+2, Jiansen He wrote:

 Hi,

 Say an entity has a list property which has 1 million integers.  Now we 
 need to update the list property by adding 1 more integer.  Does updating 
 via put cost 2 million write operations? If so, is there a cheap 
 alternative?

 With Thanks
 Jiansen


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Cost of updating list property

2013-01-25 Thread Michael Hermus
I believe that each value in an indexed multi-valued property gets its own 
index entry. Therefore, I think that adding 1 value should incur the cost of 
adding one index entry, which is 2 writes (one for asc, one for desc) and 1 
write for each custom index that includes the property.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Cost of updating list property

2013-01-25 Thread Guido van Rossum
The only way to get this to perform is to serialize the values into a
string. Repeated properties are way too slow when you get to this number of
repetitions. (They're good for tags, which need to be indexed, and of which
youd expect there to be z few, or dozens, or occasionally hundreds.)

--Guido

On Fri, Jan 25, 2013 at 11:37 AM, Ryan Chazen rya...@gmail.com wrote:

 Depends if those integers are indexed or not. Each index is a write op.
 However, an entity can only be 1mb big.. I think 1 million integers would
 be more than 1mb as appengine stores natively as strings...

 What you could try is to store the integers in multiple entities (say
 1-1000 integers per entity). That would make adding new integers easy as
 you would not need to modify old entities. You could join all the integers
 back together if needed with a query.


 On Friday, January 25, 2013 8:32:48 PM UTC+2, Jiansen He wrote:

 Hi,

 Say an entity has a list property which has 1 million integers.  Now we
 need to update the list property by adding 1 more integer.  Does updating
 via put cost 2 million write operations? If so, is there a cheap
 alternative?

 With Thanks
 Jiansen

  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
--Guido van Rossum (python.org/~guido)

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.