mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #10345 from Vxider/mv_parallel_insert_pt
Add performance test for parallel insert of materialized view
This commit is contained in:
commit
abbeb13cf0
32
tests/performance/materialized_view_parallel_insert.xml
Normal file
32
tests/performance/materialized_view_parallel_insert.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>
|
||||
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
|
||||
</create_query>
|
||||
<fill_query>SET max_insert_threads=8</fill_query>
|
||||
<fill_query>SYSTEM STOP MERGES</fill_query>
|
||||
|
||||
<query>
|
||||
INSERT INTO hits_mv
|
||||
SELECT CounterID, EventDate, UserID, Title
|
||||
FROM hits_10m_single
|
||||
</query>
|
||||
|
||||
<drop_query>SYSTEM START MERGES</drop_query>
|
||||
<drop_query>DROP TABLE IF EXISTS hits_mv</drop_query>
|
||||
</test>
|
Loading…
Reference in New Issue
Block a user