Adds support for estimating the selectivity of complex CNF/DNF filter expressions, such as (a < 1 and a > 0) or b = 3, using table statistics.
Why it matters
This feature improves query optimization by allowing ClickHouse to better estimate the cardinality of complex filter conditions combining ANDs and ORs. Accurate selectivity estimation helps the query planner make more informed decisions, leading to improved query performance and resource utilization.How to use it
The selectivity estimation for complex CNF/DNF expressions using statistics is automatic as part of ClickHouse's query optimization process. Users do not need to enable any additional settings, but must ensure that appropriate table statistics are collected and up to date.