On Fri, Mar 19, 2010 at 9:04 AM, Ulrich <[email protected]> wrote: > Depending on the list of keys, it might be faster to use a query. I have a > case, where I have a sorted list of key names and the there is no other key > in the datastore that is bigger than the first key and smaller than the last > key of the list. I experimented a bit, and for me, the following solution > was significantly faster than getting all keys with a batch get. > SELECT * FROM Model WHERE __key__ >= :key_first ORDER BY __key__ > (and fetching length(list) entities) > > I don't know if your list of keys has a similar structure, but I thought it > could help you.
I'd love to do some benchmarking - however my key selection is pretty specialized (via list membership on a child entity, per Brett Slatkin's "RelationalIndex" notion in his Google IO talk). It's good to know, however, that I can pull bulk entities in this way in a very fast way - useful, if nothing else, for pagination in an admin interface. Thanks for the tip. -- 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.
