This commit is contained in:
Nikita Taranov 2024-11-18 12:44:49 +01:00
parent 742f1eb41e
commit c998df6c8c
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Order: a ASC, b ASC
ReadType: InOrder

View File

@ -0,0 +1,24 @@
CREATE TABLE test
(
a UInt64,
b UInt64
)
ENGINE = MergeTree
ORDER BY (a, b);
INSERT INTO test SELECT number, number FROM numbers_mt(1e6);
set enable_analyzer = 1;
SELECT trimBoth(replaceRegexpAll(explain, '__table1.', ''))
FROM
(
EXPLAIN actions = 1
SELECT count(*)
FROM test
GROUP BY
b,
a
SETTINGS optimize_aggregation_in_order = 1
)
WHERE explain LIKE '%Order%';