uniq_keys 100000 250000 500000 1000000 5000000 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 uniqExact(a) FROM remote('127.0.0.{{1,2}}', default, t_{uniq_keys}) SETTINGS max_threads=5 drop table t_{uniq_keys}