v.20.5Improvement

Adding PREWHERE Support for Live View Tables

Adding support for PREWHERE in live view tables. #11495 (vzakaznikov).
Added support for PREWHERE clause in Live View tables.

Why it matters

This feature allows users to apply the PREWHERE 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 use PREWHERE 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 condition


This enables ClickHouse to filter data in the PREWHERE stage, optimizing the Live View refresh process.