Repro test

This commit is contained in:
Alexander Gololobov 2023-07-04 22:39:51 +02:00
parent 3a170c297a
commit 04d745a5e0
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,4 @@
-- count() ------------------------------
2
-- count() with parallel replicas -------
2

View File

@ -0,0 +1,24 @@
CREATE TABLE users (uid Int16, name String, age Int16) ENGINE=MergeTree() ORDER BY uid;
INSERT INTO users VALUES (111, 'JFK', 33);
INSERT INTO users VALUES (6666, 'KLM', 48);
INSERT INTO users VALUES (88888, 'AMS', 50);
SELECT '-- count() ------------------------------';
SELECT count() FROM users PREWHERE uid > 2000;
-- enable parallel replicas but with high granules threshold
SET
skip_unavailable_shards=1,
allow_experimental_parallel_reading_from_replicas=1,
max_parallel_replicas=3,
use_hedged_requests=0,
cluster_for_parallel_replicas='parallel_replicas',
parallel_replicas_for_non_replicated_merge_tree=1,
parallel_replicas_min_number_of_granules_to_enable=1000;
SELECT '-- count() with parallel replicas -------';
SELECT count() FROM users PREWHERE uid > 2000;