Google App Engine - getting count of records that match criteria over 1000 -


I have read in many places that GAE raised the 1000 record limit on query and count, however, I only recorded up to 1000 records,

Get count of. I will not take more than 1000 questions at a time, but the requirements are such that I need the count of Milan records.

I understand that you can use the cursor to "endorse" through a dataset, but only one count seems to be slightly more than the cycle. Probably when he said that he "picked up" the boundary, then it was a difficult limit - you still need to cycle through the result 1000, am I right?

Should I use any other method correctly? All () / filter method to generate 1000+ calculations?

Thank you in advance for all your help!

No limit of behavior incompatible with the documentation is clearly not specified - the documentation indicates that It will count "until the time of the counting or the end of time". GAE reported this bug (approximately 3 weeks ago).

Action : Clearly specify a limit and then that value will be used (instead of the default of 1,000).

Testing on this demonstrates:

  # 1500 test model entites ... # ... >> gt; & Gt; TestModel.all (keys_only = True) .Count () 1000L & gt; & Gt; & Gt; TestModel.all (keys_only = True) .count (10000) 1500L  

I also see the same behavior on the latest version of Development Server (1.3.7) using this simple test app : Import google.appengine.ext from webapp, google.appengine.ext.webapp.util import run_wsgi_app class from blah (db.model) db: pass class manpage (webapp.RequestHandler): def (self): for i amrange (3): DB (For [Blah ()) in the xrange (500)] # can put 500 at a time ... c = blah.all (). Count () C10k = Blah.All (). Count (10000) self.response.out.write ('% d% d'% (c, c10k)) # Prints "1000 1500" on your first run application = webapp.WSGIApplication ([([/ ', manpage]] ) Def main (): run_vassio_app (application) if __name__ == '__main__': main ()


Comments