mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
add test for aggregation by primary key and many parts
This commit is contained in:
parent
88cd775f6a
commit
6aecaea664
@ -0,0 +1,11 @@
|
||||
94950
|
||||
84950
|
||||
74950
|
||||
64950
|
||||
54950
|
||||
=======
|
||||
94950
|
||||
84950
|
||||
74950
|
||||
64950
|
||||
54950
|
16
tests/queries/0_stateless/01786_group_by_pk_many_streams.sql
Normal file
16
tests/queries/0_stateless/01786_group_by_pk_many_streams.sql
Normal file
@ -0,0 +1,16 @@
|
||||
DROP TABLE IF EXISTS group_by_pk;
|
||||
|
||||
CREATE TABLE group_by_pk (k UInt64, v UInt64)
|
||||
ENGINE = MergeTree ORDER BY k PARTITION BY v % 50;
|
||||
|
||||
INSERT INTO group_by_pk SELECT number / 100, number FROM numbers(1000);
|
||||
|
||||
SELECT sum(v) AS s FROM group_by_pk GROUP BY k ORDER BY s DESC LIMIT 5
|
||||
SETTINGS optimize_aggregation_in_order = 1, max_block_size = 1;
|
||||
|
||||
SELECT '=======';
|
||||
|
||||
SELECT sum(v) AS s FROM group_by_pk GROUP BY k ORDER BY s DESC LIMIT 5
|
||||
SETTINGS optimize_aggregation_in_order = 0, max_block_size = 1;
|
||||
|
||||
DROP TABLE IF EXISTS group_by_pk;
|
Loading…
Reference in New Issue
Block a user