mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
8931d3eb6f
Since if the connection will be closed (by some reason), then the setting will not be applied after transparent reconnect (since only native clickhouse-client can do this, since it parses the query, but perf tests uses python driver). Just use inplace SETTINGS clause or <settings>.
34 lines
1011 B
XML
34 lines
1011 B
XML
<test>
|
|
|
|
<preconditions>
|
|
<table_exists>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, Title
|
|
FROM hits_10m_single
|
|
-- do not select anything because we only need column types
|
|
LIMIT 0
|
|
</create_query>
|
|
<fill_query>SYSTEM STOP MERGES</fill_query>
|
|
|
|
<query>
|
|
INSERT INTO hits2
|
|
SELECT CounterID, EventDate, UserID, Title
|
|
FROM hits_10m_single
|
|
SETTINGS max_insert_threads=8
|
|
</query>
|
|
|
|
<drop_query>SYSTEM START MERGES</drop_query>
|
|
<drop_query>DROP TABLE IF EXISTS hits2</drop_query>
|
|
</test>
|