Description
create index ix2 on default where x like "test%";
select meta().id from default where x like "test%"; – sargable to ix2
select meta().id from default where x like "testa%"; – not saragble to ix2
If rewrite equivalent index below both queries are sargable
create index ix2 on default where x >= "test" and x < "tesu";
Attachments
For Gerrit Dashboard: MB-19574 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
65043,3 | MB-19575, MB-19574. Normalize LIKE expressions to comparison operators when possible, enabling subsetting and pushdown. | master | query | Status: MERGED | +2 | +1 |
65595,2 | changes for verifying MB-19574 | master | testrunner | Status: MERGED | +2 | +1 |
65598,2 | changes for MB-19574 | master | testrunner | Status: MERGED | +2 | +1 |