Search before asking
- I had searched in the issues and found no similar issues.
Description
When predicate column has poor selectivity, there is still optimization room for read column by rowids.
// this sql will return all result.
SELECT sum(LO_REVENUE) FROM test.lineorder_flat WHERE P_CATEGORY != 'AMRC';
perf
Solution
Find continuous rowids in batch.
perf after optimize
Of course, This optimization is only effective when there are many consecutive values.
So we can see whether there is performance fallback when there is no so many consecutive values.
SELECT sum(LO_REVENUE) FROM test.lineorder_flat WHERE P_CATEGORY = 'MFGR#12'
perf before:
perf after:
There is a slight performance fallback.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
暂无答案!
目前还没有任何答案,快来回答吧!