Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-incubating
-
None
-
None
Description
We saw the following issue in a customer scenario:
SELECT SUM(c)
from tbl2
where a in ('A','B')
AND b >= '8';
The table has a salted index on column a. That index has many more columns (13 in this case, including the salt column).
The plan we would expect is an MDAM plan with no predicate on SALT and the OR predicate on column a.
However, we get a full index scan (we can use an index-only scan in this case).
When we force an MDAM plan, we see a vastly higher cost (250,000 in our example) than for the single subset plan (cost of 9 in our example).
Dave has already mentioned that this has to do with RangeSpecs. The following workaround gives the MDAM plan for us:
cqd RANGESPEC_TRANSFORMATION 'off';
Attachments
Issue Links
- links to