Details
-
Improvement
-
Resolution: Unresolved
-
Critical
-
cbq-DP3, 4.5.0
-
Security Level: Public
Description
I built the index:
CREATE INDEX by_year ON bucket-1(year)
and tried to run the query:
SELECT DISTINCT year FROM bucket-1 LIMIT 20
which resulted in all docs scan:
https://gist.github.com/pavel-paulau/4da0f5e5cc37285e7265
https://gist.github.com/pavel-paulau/a7245ab7254c1b4fb53e
There are 20M documents and 15 unique years.
Attachments
Issue Links
- duplicates
-
MB-32408 DISTINCT doesn't push down
- Closed
Gerrit Reviews
For Gerrit Dashboard: MB-11140 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
73763,5 | MB-21890 Spock Index Api2 architecture MB-20163 Stable Index Scan. MB-19918 Improve index integration for composite index filters. MB-18404 Ability to push the offset to indexer. MB-21755 Exploit the ASC/DESC index key ordering in N1QL. MB-9244 MAX uses index and scans optimum # of rows. MB-21758 Request required keys only from indexer. MB-11140 Exploit DISTINCT in Index Scan. MB-21759 Exploit COUNT DISTINCT From Indexer. MB-21757 Support Rolling Upgrade | master | query | Status: MERGED | +2 | +1 |
74217,2 | MB-11140. Push Distinct as hint to indexer | master | query | Status: MERGED | +2 | +1 |
74803,2 | MB-21758 Test for Index Projection MB-11140 Test for Distinct MB-21759 COUNT(DISTINCT expr) | master | testrunner | Status: MERGED | +2 | +1 |