From 31348bfeb8039ff359f04f06fea3efce9db2382b Mon Sep 17 00:00:00 2001 From: BorisTyshkevich <125603338+BorisTyshkevich@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:13:41 +0200 Subject: [PATCH] Update backfill-populate-mv-in-a-controlled-manner.md attach after finalize note --- .../backfill-populate-mv-in-a-controlled-manner.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/altinity-kb-schema-design/materialized-views/backfill-populate-mv-in-a-controlled-manner.md b/content/en/altinity-kb-schema-design/materialized-views/backfill-populate-mv-in-a-controlled-manner.md index 160154154c..cb253d5f3a 100644 --- a/content/en/altinity-kb-schema-design/materialized-views/backfill-populate-mv-in-a-controlled-manner.md +++ b/content/en/altinity-kb-schema-design/materialized-views/backfill-populate-mv-in-a-controlled-manner.md @@ -57,7 +57,7 @@ WHERE toYYYYMM(ts) = 202105; Actually, the first GROUP BY run will happen just before 1M rows will be stored on disk as a data part. You may disable that behavior by switching off [optimize_on_insert](https://clickhouse.com/docs/en/operations/settings/settings#optimize-on-insert) setting if you have heavy calculations during aggregation. -You may attach such a table (with AggregatingFunction columns) to the main table as in the example above, but if you don't like to have States in the aggregated table, data should be finalized and converted back to normal values. In that case, you have to move data by INSERT ... SELECT again: +You may attach such a table (with AggregatingFunction columns) to the main table as in the example above, but if you don't like having States in the Materialized Table, data should be finalized and converted back to normal values. In that case, you have to move data by INSERT ... SELECT again: ```sql INSERT INTO MV @@ -66,7 +66,7 @@ SELECT id,ts,v1,v2, -- nothing special for SimpleAggregatingFunction columns from mv_import FINAL ``` -The last run of GROUP BY will happen during FINAL execution and AggregatingFunction types converted back to normal values. +The last run of GROUP BY will happen during FINAL execution and AggregatingFunction types converted back to normal values. To simplify retries after failures an additional temporary table and the same trick with ATTACH could be applied.