mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
More detailed test
This commit is contained in:
parent
7a381e9232
commit
6854dd064f
@ -1,5 +1,19 @@
|
|||||||
40000
|
-- { echoOn }
|
||||||
all_1_1_0
|
SELECT count(), _part FROM 02581_trips GROUP BY _part ORDER BY _part;
|
||||||
all_2_2_0
|
10000 all_1_1_0
|
||||||
all_3_3_0
|
10000 all_2_2_0
|
||||||
all_4_4_0
|
10000 all_3_3_0
|
||||||
|
10000 all_4_4_0
|
||||||
|
-- Run mutation with a 'IN big subquery'
|
||||||
|
ALTER TABLE 02581_trips UPDATE description='1' WHERE id IN (SELECT (number*10+1)::UInt32 FROM numbers(10000000)) SETTINGS mutations_sync=2;
|
||||||
|
SELECT count(), _part FROM 02581_trips WHERE description = '' GROUP BY _part ORDER BY _part;
|
||||||
|
9000 all_1_1_0_5
|
||||||
|
9000 all_2_2_0_5
|
||||||
|
9000 all_3_3_0_5
|
||||||
|
9000 all_4_4_0_5
|
||||||
|
ALTER TABLE 02581_trips UPDATE description='2' WHERE id IN (SELECT (number*10+2)::UInt32 FROM numbers(10000)) SETTINGS mutations_sync=2;
|
||||||
|
SELECT count(), _part FROM 02581_trips WHERE description = '' GROUP BY _part ORDER BY _part;
|
||||||
|
8000 all_1_1_0_6
|
||||||
|
8000 all_2_2_0_6
|
||||||
|
8000 all_3_3_0_6
|
||||||
|
8000 all_4_4_0_6
|
||||||
|
@ -4,15 +4,18 @@ CREATE TABLE 02581_trips(id UInt32, description String) ENGINE=MergeTree ORDER B
|
|||||||
|
|
||||||
-- Make multiple parts
|
-- Make multiple parts
|
||||||
INSERT INTO 02581_trips SELECT number, '' FROM numbers(10000);
|
INSERT INTO 02581_trips SELECT number, '' FROM numbers(10000);
|
||||||
INSERT INTO 02581_trips SELECT number+10000000, '' FROM numbers(10000);
|
INSERT INTO 02581_trips SELECT number+10000, '' FROM numbers(10000);
|
||||||
INSERT INTO 02581_trips SELECT number+20000000, '' FROM numbers(10000);
|
INSERT INTO 02581_trips SELECT number+20000, '' FROM numbers(10000);
|
||||||
INSERT INTO 02581_trips SELECT number+30000000, '' FROM numbers(10000);
|
INSERT INTO 02581_trips SELECT number+30000, '' FROM numbers(10000);
|
||||||
|
|
||||||
SELECT count() from 02581_trips;
|
-- { echoOn }
|
||||||
|
SELECT count(), _part FROM 02581_trips GROUP BY _part ORDER BY _part;
|
||||||
SELECT name FROM system.parts WHERE database=currentDatabase() AND table = '02581_trips' AND active ORDER BY name;
|
|
||||||
|
|
||||||
-- Run mutation with a 'IN big subquery'
|
-- Run mutation with a 'IN big subquery'
|
||||||
ALTER TABLE 02581_trips UPDATE description='' WHERE id IN (SELECT (number+5)::UInt32 FROM numbers(10000000)) SETTINGS mutations_sync=2;
|
ALTER TABLE 02581_trips UPDATE description='1' WHERE id IN (SELECT (number*10+1)::UInt32 FROM numbers(10000000)) SETTINGS mutations_sync=2;
|
||||||
|
SELECT count(), _part FROM 02581_trips WHERE description = '' GROUP BY _part ORDER BY _part;
|
||||||
|
ALTER TABLE 02581_trips UPDATE description='2' WHERE id IN (SELECT (number*10+2)::UInt32 FROM numbers(10000)) SETTINGS mutations_sync=2;
|
||||||
|
SELECT count(), _part FROM 02581_trips WHERE description = '' GROUP BY _part ORDER BY _part;
|
||||||
|
-- { echoOff }
|
||||||
|
|
||||||
DROP TABLE 02581_trips;
|
DROP TABLE 02581_trips;
|
||||||
|
Loading…
Reference in New Issue
Block a user