feat(query): add topn runtime filter in native storage format by sundy-li · Pull Request #9738 · databendlabs/databend (original) (raw)

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

If we push down the sort + limit to storage level, we can have TopN opt.

But it must work with runtime predication (prewhere) + Page index optimization , so currently we only have it in native storage format.

Query select * from hits_page where URL like '%google%' order by EventTime desc limit 10; can works 5 times faster.