Hello Richard, since you're not mentioning it could you tell us whether or not you've defined indexes for this specific query? There's also no indication of how large these entities are. Do you get the same issues for other kind of entities?
You should read through the queries best practices <https://cloud.google.com/datastore/docs/best-practices#queries> and make sure you're following them all. On Thursday, August 31, 2017 at 4:31:20 AM UTC-4, Richard Cheesmar wrote: > > The following query seems to take an way too long > > > t0 = time.time() > > # Fetch the entities and return result with cursor > result, next_cursor, more = MyModel.query(MyModel.active == True, > MyModel.offline == False).fetch_page(pagination, start_cursor=cursor) > > logging.info(time.time() - t0) > > > > On the local development machine it takes nearly 2 seconds and there are > less than 150 entities in the model > > When live with around 800 entities it takes nearly 2 seconds to retrieve > the first 250 entities and then around 4 seconds to retrieve the remainder > . There are two separate requests to retrieve each set on the live machine > . > > I've set the time on the query only, therefore no other processing is > taken into account in these timings. > > > Enter code here... > > > > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e97a8f1b-b273-4fcb-9b89-83a7311a7f01%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
