Interestingly, I have another query which is identical except for one more entity comparison
result, next_cursor, more = MyModel.query(MyModel.active == True, MyModel.offline == False, MyModel.location.alpha2 == alpha2).fetch_page(pagination, start_cursor=cursor) This query is infinitely faster. Are Boolean model properties indexed by default? On Thursday, August 31, 2017 at 11:31:20 AM UTC+3, 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/308d5d98-835e-46cf-b896-5263ee62b64a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
