Thanks for the info. I can see count and tried it. Thank you. As a side note, I have a look into org.datanucleus.store.appengine.query.DatastoreQuery In case of count, it's a call to com.google.appengine.api.datastore.PreparedQuery.countEntities() Key only query still need to go through some wrapping/serialization though. So it seems to me the former is more efficient (currently not support with limit/offset though).
On Wed, Apr 28, 2010 at 2:41 PM, Joe Fawzy <[email protected]> wrote: > it is supported ,use it.... > u can find several posts about it in this group > joe > > On Apr 28, 4:47 am, Chau Huynh <[email protected]> wrote: > > On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy <[email protected]> wrote: > > > > select count (this) from User > > Since when app engine support group operation? ;-) > > > > > > > > > > > > On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy <[email protected]> wrote: > > > Hi all > > > i am using JDO and i want to count the number of entities so which is > > > more efficient > > > using a count quert, eg: > > > select count (this) from User > > > or key only query > > > select id from User > > > then get the count using resultList.size(); > > > > > by the way , i know that the recommended way on appengine is to > > > precompute but this cannot be done in my case > > > thanks > > > Joe > > > > > -- > > > 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 > > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-appengine-java%[email protected]><google-appengine-java%2B > [email protected]> > > > . > > > 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 > [email protected]. > > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > > For more options, visit this group athttp:// > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > 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 [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-java?hl=en.
