If you 'always' going to sort locally instead of using datastore, you could save yourself one entry in index.yaml
On Tue, Jun 15, 2010 at 2:50 AM, johnP <[email protected]> wrote: > Thanks for the answer. The key is to know that there *is* a > continuum, where at one end, it is better to sort locally and at the > other end, sort with indexes. > > johnP > > > On Jun 14, 2:09 pm, "Ikai L (Google)" <[email protected]> wrote: > > No, no rules of thumb. If you're expecting lots of small datasets with a > > complex sort, you're almost always going to want to do it locally instead > of > > in the datastore. Just be aware that if the memory usage on your > application > > bloats too much that it could be restarted. > > > > > > > > > > > > On Mon, Jun 14, 2010 at 12:36 PM, johnP <[email protected]> wrote: > > > Actually, this is an interesting question. Is it generally better to > > > sort using the datastore, or sort using python code. For example, > > > let's say you have a list of people, and you need to get various > > > qualities about the people (let's say the list is a couple hundred > > > people or less). One approach can be to use multiple indexes: Order > > > people by name; and age > 50. Order reverse name and height > 5 > > > feet. > > > > > A different approach is to memcache the entire list, and filter it > > > using list comprehensions. > > > > > Besides the usual "profile your code" response - is there any rule-of- > > > thumbs to use to select an approach? > > > > > johnP > > > > > On Jun 14, 11:48 am, "Ikai L (Google)" <[email protected]> wrote: > > > > You're limited to 200 indexes for a billing enabled app and 100 for a > > > > non-billing enabled application. > > > > > > The number of indexes does not introduce a scalability cap, it just > makes > > > > every write much, much more expensive. The question here is whether > or > > > not > > > > your budget can support this. > > > > > > On Sat, Jun 12, 2010 at 11:23 AM, Harshal <[email protected]> > wrote: > > > > > Hi, > > > > > > > Until Google releases the version which they showcased in I/O where > we > > > > > won't have to deal with exploding indexes, I guess our choices are > very > > > > > limited and we would have to live with it. > > > > > > > I would like to go ahead and ask, what is acceptable number indexes > > > people > > > > > have in general? I have an entity which has something like 42 > indexes > > > > > (because I have to filter in various ways on many properties many > > > times). Is > > > > > it scalable ? ( I am seeing high CPU spikes but I am fine with > that, > > > well at > > > > > least as of now). > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "Google App Engine" group. > > > > > To post to this group, send email to > [email protected] > > > . > > > > > To unsubscribe from this group, send email to > > > > > [email protected]<google-appengine%[email protected]><google-appengine%2Bunsubscrib > [email protected]><google-appengine%2Bunsubscrib > > > [email protected]> > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/google-appengine?hl=en. > > > > > > -- > > > > Ikai Lan > > > > Developer Programs Engineer, Google App Engine > > > > Blog:http://googleappengine.blogspot.com > > > > Twitter:http://twitter.com/app_engine > > > > Reddit:http://www.reddit.com/r/appengine > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google App Engine" group. > > > To post to this group, send email to [email protected] > . > > > To unsubscribe from this group, send email to > > > [email protected]<google-appengine%[email protected]><google-appengine%2Bunsubscrib > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > Ikai Lan > > Developer Programs Engineer, Google App Engine > > Blog:http://googleappengine.blogspot.com > > Twitter:http://twitter.com/app_engine > > Reddit:http://www.reddit.com/r/appengine > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
