ClickHouse/dbms/tests/performance/parallel_insert.xml
Alexander Kuzmenkov 9b4e45748a fixup
2020-03-12 21:26:02 +03:00

37 lines
1.1 KiB
XML

<test>
<stop_conditions>
<any_of>
<iterations>2</iterations>
</any_of>
</stop_conditions>
<preconditions>
<table_exists>default.hits_10m_single</table_exists>
</preconditions>
<create_query>
CREATE TABLE hits2 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, Referer, WatchID
FROM hits_10m_single
</create_query>
<fill_query>SET max_insert_threads=8</fill_query>
<fill_query>SYSTEM STOP MERGES</fill_query>
<query>
INSERT INTO hits2
SELECT CounterID, EventDate, UserID, Referer, WatchID
FROM hits_10m_single
</query>
<drop_query>SYSTEM START MERGES</drop_query>
<drop_query>DROP TABLE IF EXISTS hits2</drop_query>
</test>