Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Google Appengine Ndb GQL query max limit?

I am looking around in order to get an answer what is the max limit of results I can have from a GQL query on Ndb on Google AppEngine. I am using an implementation with cursors but it will be much faster if I retrieve them all at once.

like image 557
topless Avatar asked Jun 10 '12 11:06

topless


2 Answers

This depends on lots of things like the size of the entities and the number of values that need to look up in the index, so it's best to benchmark it for your specific application. Also beware that if you find that on a sunny day it takes e.g. 10 seconds to load all your items, that probably means that some small fraction of your queries will run into a timeout due to natural variations in datastore performance, and occasionally your app will hit the timeout all the time when the datastore is having a bad day (it happens).

like image 113
Guido van Rossum Avatar answered Nov 13 '22 19:11

Guido van Rossum


Basically you don't have the old limit of 1000 entities per query anymore, but consider using a reasonable limit, because you can hit the time out error and it's better to get them in batches so users won't wait during load time.

like image 7
Lipis Avatar answered Nov 13 '22 21:11

Lipis