Details
-
Improvement
-
Resolution: Duplicate
-
Major
-
6.0.0
-
None
Description
A simple DISTINCT query does not seem to pushdown to the index the way we would expect:
CREATE INDEX idx ON test(type);
|
SELECT DISTINCT type FROM test WHERE type IS NOT MISSING;
|
However, the equivalent using GROUP BY does get pushed down:
SELECT type FROM test WHERE type IS NOT MISSING GROUP BY type;
|
Attachments
Issue Links
- is duplicated by
-
MB-11140 [N1QL] Exploit DISTINCT in Index Scan (Was: SELECT DISTINCT scans all docs)
- Reopened