Hi Oliver, The iterator works by fetching batches of 20* entities at a time from a single query (it doesn't re-execute the query each time). If you always want to return all the results, you should definitely use .fetch(1000), though - it's faster than fetching in batches.
-Nick Johnson On Thu, Aug 6, 2009 at 8:56 PM, Oliver Zheng<[email protected]> wrote: > > The docs suggest that if the limit of a fetch operation is unknown, > the Query should be used as an iterator. But how does it accomplish > that? Does it do an index search and db.get() for each iteration? If > the limit is unknown, aren't I better off with fetch(1000) since there > is only 1 db.get()? > > Thanks, > Oliver > > > -- Nick Johnson, Developer Programs Engineer, App Engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
