How fast are App Engine db.get(keys) and A.all(keys_only=True).filter('b =', b).fetch(1000)?
Posted
by Liron Shapira
on Stack Overflow
See other posts from Stack Overflow
or by Liron Shapira
Published on 2010-06-17T23:20:47Z
Indexed on
2010/06/17
23:23 UTC
Read the original article
Hit count: 216
python
|google-app-engine
A db.get() of 50 keys seems to take me 5-6 seconds. Is that normal? What is the time a function of?
I also did a A.all(keys_only=True).filter('b =', b).fetch(1000) where A.b is a ReferenceProperty. I did 50 such round trips to the datastore, with different values of b, and the total time was only 3-4 seconds.
How is this possible? db.get() is done in parallel, with only one trip to the datastore, and I would think that looking up an entity by key is a faster operation than fetch.
© Stack Overflow or respective owner