Hey Jon, This is a pretty common requirement/question, the standard way is to page out the entities you need in blocks of 1000. This is done by fetching 1000 and keeping a 'bookmark' entity (which is the last entity fetched). Then modifying to fetch the next 1000 entities with a key larger than the last one retrieved, and so on...
This is outlined nicely with examples in the article "Paging through large datasets" (http://code.google.com/appengine/articles/paging.html). I also think it is covered in the "Building Scalable Web Applications with GAE" Google I/O talk ( http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine ). Hope that helped. Will. 2009/10/13 jonbbbb <[email protected]> > > Hi, > > I have been reading about the datastore, and as I understand you can > only retrive the first 1000 rows in a query. > > I am just wondering if it is possible to do this with the datastore, > or if there is a common way to > design around this. > > For example I am thinking about a list of subscribers for a topic or > channel, and say if this list gets popular and gets more than 1000 > subscribers it gets problematic to have this in the datastore, because > I would want to iterate through all the subscribers. > > So one way that comes to mind is to conceptually have some sort of > overlay structure, like a linked list, so you could put some extra > variable in the where clause of the query to get to the rows that > where beyond the 1000 offset. But it seems a bit complicated way to do > it, no? > > Any ideas? > > > Regards, > Jon Berg. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
