Skip to content

Commit 9cadcb1

Browse files
Update 02811_parallel_replicas_prewhere_count.sql
1 parent c0629a3 commit 9cadcb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
DROP TABLE IF EXISTS users;
12
CREATE TABLE users (uid Int16, name String, age Int16) ENGINE=MergeTree() ORDER BY uid;
23

34
INSERT INTO users VALUES (111, 'JFK', 33);
45
INSERT INTO users VALUES (6666, 'KLM', 48);
56
INSERT INTO users VALUES (88888, 'AMS', 50);
67

7-
88
SELECT '-- count() ------------------------------';
99
SELECT count() FROM users PREWHERE uid > 2000;
1010

11-
1211
-- enable parallel replicas but with high granules threshold
1312
SET
1413
skip_unavailable_shards=1,
@@ -19,6 +18,7 @@ cluster_for_parallel_replicas='parallel_replicas',
1918
parallel_replicas_for_non_replicated_merge_tree=1,
2019
parallel_replicas_min_number_of_granules_to_enable=1000;
2120

22-
2321
SELECT '-- count() with parallel replicas -------';
2422
SELECT count() FROM users PREWHERE uid > 2000;
23+
24+
DROP TABLE users;

0 commit comments

Comments
 (0)