v.23.8New Feature

Add max_threads_for_indexes Setting to Limit Primary Key Processing Threads

Add max_threads_for_indexes setting to limit number of threads used for primary key processing. #53313 (jorisgio).
Introduces the max_threads_for_indexes setting to limit the number of threads used during primary key processing in ClickHouse.

Why it matters

This feature allows users to control and limit the concurrency of threads dedicated to primary key index processing. It helps optimize resource usage, prevent excessive CPU consumption, and improve overall system stability when processing large datasets with primary keys.

How to use it

To enable or adjust this feature, set the max_threads_for_indexes parameter in your ClickHouse server configuration or in session settings. For example:

SET max_threads_for_indexes = <desired_number>;


This will restrict the maximum number of threads used for processing primary key indexes accordingly.