Ritz
1
How does couchbase decided to cover an index. I have created two indexes but when i look into execution plan one is covered and other is not.
created index idx_123 on bucket( value1,value2,value3,value4,value5,value6) where type=“ABC”
Create index idx_324 on bucket (a,b,c,d) where type=“PQR”
What metrics does it consider for taking this decision?
vsr1
2
If index has all the information that required by query then it uses covered index.
If plan uses UnionScan, IntersectScan will not cover the query.
Ritz
3
so my query is
Select a,b,c,d from bucket where type=PQR and
a=""
and b=""
group by c,d.
But i can see in plan it is not getting covered though index has all data
vsr1
4
PQR must be string.
Select a,b,c,d from bucket where type="PQR" and
a=""
and b=""
group by c,d
If you have issue post the full EXPLAIN and index definition.
Ritz
5
yes let me share execution plan