Open leomao10 opened 5 years ago
Sorry to ping you directly @wsh
But it seems this issue get ignored for a while.
Wondering if datastore-ndb-python
still not supporting fetching data for or
clause concurrently? Or there is a way for me to get around it?
In our project, we got query like this:
And the performance become worse when we
owner_uids
become bigger, after some profiling, we found that it is because we make datastore query sequentially for eachowner_uid
.And from the ndb doc, we found that any of the
IN
operation would translate toOR
https://cloud.google.com/appengine/docs/standard/python/ndb/queries#neq_and_inAnd I found this code in the current code:
https://github.com/GoogleCloudPlatform/datastore-ndb-python/blob/master/ndb/query.py#L1957
It doesn't seem to be the most efficient way to filter with
IN
operation. Wondering if there is a way to change it to make subqueries concurrently.