enable_optimize_predicate_expression
Turns on predicate pushdown inSELECT queries.
Predicate pushdown may significantly reduce network traffic for distributed queries.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
SELECT count() FROM test_table WHERE date = '2018-10-10'SELECT count() FROM (SELECT * FROM test_table) WHERE date = '2018-10-10'
enable_optimize_predicate_expression = 1, then the execution time of these queries is equal because ClickHouse applies WHERE to the subquery when processing it.
If enable_optimize_predicate_expression = 0, then the execution time of the second query is much longer because the WHERE clause applies to all the data after the subquery finishes.