From aa8840447f280a0bdf8f5f53e91e6da017898c5f Mon Sep 17 00:00:00 2001 From: Vxider Date: Sat, 18 Apr 2020 15:20:10 +0800 Subject: [PATCH 1/2] add performance test for mv_parallel_ insert --- .../materialized_view_parallel_insert.xml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/performance/materialized_view_parallel_insert.xml diff --git a/tests/performance/materialized_view_parallel_insert.xml b/tests/performance/materialized_view_parallel_insert.xml new file mode 100644 index 00000000000..a430c4e480c --- /dev/null +++ b/tests/performance/materialized_view_parallel_insert.xml @@ -0,0 +1,38 @@ + + + + 2 + + + + + hits_10m_single + + + + CREATE MATERIALIZED VIEW hits_mv ENGINE MergeTree + PARTITION BY toYYYYMM(EventDate) + ORDER BY (CounterID, EventDate, intHash32(UserID)) + SAMPLE BY intHash32(UserID) + SETTINGS + parts_to_delay_insert = 5000, + parts_to_throw_insert = 5000 + AS + -- don't select all columns to keep the run time down + SELECT CounterID, EventDate, UserID, Title + FROM hits_10m_single + -- do not select anything because we only need column types + LIMIT 0 + + SET max_insert_threads=8 + SYSTEM STOP MERGES + + + INSERT INTO hits_mv + SELECT CounterID, EventDate, UserID, Title + FROM hits_10m_single + + + SYSTEM START MERGES + DROP TABLE IF EXISTS hits_mv + From 7fbd7e953316bedaaebfd92aa60ff2eeb84dc73e Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Sat, 18 Apr 2020 15:41:15 +0300 Subject: [PATCH 2/2] Update materialized_view_parallel_insert.xml --- tests/performance/materialized_view_parallel_insert.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/performance/materialized_view_parallel_insert.xml b/tests/performance/materialized_view_parallel_insert.xml index a430c4e480c..4b71354dec3 100644 --- a/tests/performance/materialized_view_parallel_insert.xml +++ b/tests/performance/materialized_view_parallel_insert.xml @@ -1,10 +1,4 @@ - - - 2 - - - hits_10m_single