uniq_keys
10000
50000
100000
250000
500000
1000000
create table t_{uniq_keys}(a UInt64) engine=MergeTree order by tuple()
insert into t_{uniq_keys} select number % {uniq_keys} from numbers_mt(5e7)
SELECT count(distinct a) FROM t_{uniq_keys} GROUP BY a FORMAT Null
SELECT uniqExact(a) FROM t_{uniq_keys} GROUP BY a FORMAT Null
SELECT count(distinct a) FROM t_{uniq_keys}
SELECT uniqExact(a) FROM t_{uniq_keys}
SELECT uniqExact(number) from numbers_mt(1e7)
SELECT uniqExact(number) from numbers_mt(5e7)
SELECT uniqExact(number, number) from numbers_mt(5e6)
SELECT uniqExact(number, number) from numbers_mt(1e7)
drop table t_{uniq_keys}