optimize_move_to_prewhere
Enables or disables automatic PREWHERE optimization in SELECT queries. Works only for *MergeTree tables. Possible values:- 0 — Automatic
PREWHEREoptimization is disabled. - 1 — Automatic
PREWHEREoptimization is enabled.
optimize_move_to_prewhere_if_final
Enables or disables automatic PREWHERE optimization in SELECT queries with FINAL modifier. Only conditions that depend on the sorting key alone and are deterministic within the query are moved, so the result ofFINAL is not affected. For GraphiteMergeTree,
FINAL merges adjacent rows of one path into one row. Thus the optimization moves only conditions on the path column,
and only if the path is the first column of the sorting key.
Works only for *MergeTree tables.
Possible values:
- 0 — Automatic
PREWHEREoptimization inSELECTqueries withFINALmodifier is disabled. - 1 — Automatic
PREWHEREoptimization inSELECTqueries withFINALmodifier is enabled.
- optimize_move_to_prewhere setting