Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.0, Cheshire-Cat
-
Untriaged
-
1
-
Unknown
Description
https://forums.couchbase.com/t/index-advisor-suggesting-a-non-optimal-index/28484
SELECT * FROM example WHERE META().id > "2ebf1fe2-a5b3-48dd-a5e5-051958f81902" AND _class = "org.example.Example" ORDER BY META().id ASC LIMIT 1000
The index advisor is advising an index that looks like this:
CREATE INDEX adv_class ON example(_class)
With the advised index the query takes 10s+ with some 600k documents.
with a manually created index
CREATE INDEX manual_index ON example(_class,(meta().id))
the query takes only around 50ms. Why does the index advisor suggest such index?
Attachments
Issue Links
- links to