v.20.5Improvement
Introduce min_insert_block_size settings for Materialized Views
Introducemin_insert_block_size_rows_for_materialized_views,min_insert_block_size_bytes_for_materialized_viewssettings. This settings are similar tomin_insert_block_size_rowsandmin_insert_block_size_bytes, but applied only for blocks inserted intoMATERIALIZED VIEW. It helps to control blocks squashing while pushing to MVs and avoid excessive memory usage. #10858 (Azat Khuzhin).
Why it matters
These settings address the need to manage block squashing and memory usage when inserting data into materialized views. By customizing minimum insert block sizes for materialized views separately from regular tables, users can optimize performance and resource consumption during data ingestion.How to use it
To use these features, set the new settingsmin_insert_block_size_rows_for_materialized_views and/or min_insert_block_size_bytes_for_materialized_views in the server configuration or session settings. For example:SET min_insert_block_size_rows_for_materialized_views = 10000;
SET min_insert_block_size_bytes_for_materialized_views = 1000000;These settings will then apply to controlling block sizes when inserting data into
MATERIALIZED VIEW tables.