willholley commented on issue #1549: Slow `_find` query when no documents match 
selector
URL: https://github.com/apache/couchdb/issues/1549#issuecomment-411680675
 
 
   just to clarify why the index is being used in the first instance, 
`"sort":[{"publishTime":"desc"}]` adds an implicit `"publishTime": { "$exists": 
true }` to the `"selector"`. If you're not specifying the `sort` in subsequent 
queries, you could add the selector clause explicitly to allow the index to be 
used (as @garrensmith suggested above).
   
   It sounds like the most performant option would be to create an index on 
`["league", "publishTime"]` and issue multiple requests - one for each league. 
You'd then need to merge/sort the results on the client.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to