v.23.11New Feature

Implement preferred_optimize_projection_name setting in ClickHouse

Implement a new setting called preferred_optimize_projection_name. If it is set to a non-empty string, the specified projection would be used if possible instead of choosing from all the candidates. #56309 (Yarik Briukhovetskyi).
Introduces a new setting preferred_optimize_projection_name that allows users to specify a preferred projection to be used during query optimization instead of automatically selecting from all available candidates.

Why it matters

This feature addresses the need for finer control over which projection is chosen for query optimization. By specifying a preferred projection name, users can optimize query performance for their specific use cases and workloads, ensuring consistent use of the desired projection.

How to use it

Set the preferred_optimize_projection_name setting to the name of the desired projection as a non-empty string. When set, ClickHouse will attempt to use this projection during query optimization instead of selecting from all candidate projections.