You can try to update counts on write, but this will only work for queries you know apriori. Even a count on keys isn't great - we need to run through all the indexes that match the query.
-- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Fri, Oct 1, 2010 at 9:27 AM, mic <[email protected]> wrote: > I need to implement paging and I need to get > > 1. a page (size specified by user) > 2. total number of rows. > > Please let me know if the performance of what I am suggesting > > 1. For total number of rows, I am planning to do a select keys from > <Kind>. This would be better than getting all columns. > > 2. For getting a page, I am doing a range query. (offset passed in by user) > > This means I am going to the datastore twice which I don't like. How can I > make this better? Any opinions ? > > Thanks in advance > > mic > > -- > 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.
