Did u try Cursors? http://code.google.com/appengine/docs/java/datastore/queries.html#Query_Cursors
On Thu, Sep 15, 2011 at 1:20 PM, cghersi <cristiano.ghe...@gmail.com> wrote: > Hi all, > > I'm facing a little problem of scalability. I'm using JDO to query my > datastore. > I need to retrieve all the keys of a given entity (such keys are of > type Long). Given that in my datastore such entity has 1.000.000 of > records, I need to get them in a very efficient way, in order to loop > over this set in a background task. > > Which is the most efficient way to do this? > > And what if I need not only the key, but also another field? Let's say > I've got an entity called TPImage: > Long idPic; //this is my key > String title; //this is the field I want to retrieve together with the > key > ... // other properties > > How may I retrieve both idPic and title in a single efficient query? > Something like > Query q = new Query("select idPic, title from " + > TPImage.class.getName()); > but more efficient? > > Thank you very much! > > Bye > cghersi > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > google-appengine-java@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.