Not sure how much it’ll help, but you could be performing an index scan of some sort because you have this in your query: WHERE b.dsDateTime IS NOT MISSING
and you should add that to your Index WHERE
clause.
You might also want to add ASC
or DESC
as a modifier to sort on dsDateTime
.
If your Couchbase bucket is shared, you should try to refine the documents contained in the index by filtering by some subset. You may be currently putting all 41M docs in the index (with null values) when you’re really trying to target a subset.