On Thu, Feb 12, 2009 at 7:50 AM, Neversummer <wrigh...@gmail.com> wrote:

> I want to get a total (sum) from an property on a given entity. I know
> that sum() is not supported. Is the best method to query for all
> records on the entity in question and work through a loop adding each
> records value (the value of the property in question) to a total
> variable?

Don't do that. That won't scale. Instead, adjust the sum on a separate
counter as you insert/change/remove entities that would affect the
sum. As Barry said, search for "sharded counter", or look at Brett
Slatkin's Google IO talk videos.


Dave.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to