DROP TABLE IF EXISTS perf_lc_num
CREATE TABLE perf_lc_num(
num UInt8,
arr Array(LowCardinality(Int64)) default [num]
) ENGINE = StripeLog
INSERT INTO perf_lc_num (num)
SELECT toUInt8(number)
FROM numbers(100000000)
1
SELECT count() FROM perf_lc_num WHERE num = 42
SELECT count() FROM perf_lc_num WHERE arr[1] = 42
SELECT count() FROM perf_lc_num WHERE has(arr, 42)
SELECT count() FROM perf_lc_num WHERE indexOf(arr, 42) > 0
SELECT count() FROM perf_lc_num WHERE arr[1] = num
SELECT count() FROM perf_lc_num WHERE has(arr, num)
SELECT count() FROM perf_lc_num WHERE indexOf(arr, num) > 0
SELECT count() FROM perf_lc_num WHERE has(arr, num * 10)
SELECT count() FROM perf_lc_num WHERE has(arr, (num * 1000 + 20) % 137)
DROP TABLE IF EXISTS perf_lc_num