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 <joewic...@gmail.com> 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 <cmhu...@gmail.com> wrote: > > On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy <joewic...@gmail.com> wrote: > > > > select count (this) from User > > Since when app engine support group operation? ;-) > > > > > > > > > > > > On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy <joewic...@gmail.com> 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 > > > google-appengine-j...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com><google-appengine-java%2B > 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-j...@googlegroups.com. > > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > . > > 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 > google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@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-j...@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.