v.20.5Improvement
Adding PREWHERE Support for Live View Tables
Adding support for PREWHERE in live view tables. #11495 (vzakaznikov).
Why it matters
This feature allows users to apply thePREWHERE optimization in Live View tables, improving query performance by filtering data earlier in the query execution process. It helps reduce the amount of data processed and accelerates real-time data aggregation and monitoring tasks.How to use it
To usePREWHERE in Live View tables, include the PREWHERE clause in your Live View query definition as you would in a regular table query. For example:CREATE LIVE VIEW example_view AS
SELECT * FROM example_table
PREWHERE conditionThis enables ClickHouse to filter data in the
PREWHERE stage, optimizing the Live View refresh process.