DC
Size: a a a
DC
l
AK
orderId UInt32,
userId UInt32,
cti
me DateTimel
l
AK
D
WITH (select range(1,1000) as arr) as val
select number, val from numbers(100000) where arrayExists(x-> x=number, val )
Format Null;
---
Peak memory usage (for query): 706.02 MiB.
2000: Peak memory usage (for query): 1.38 GiB.
3000: Peak memory usage (for query): 2.75 GiB.
4000: Peak memory usage (for query): 2.75 GiB.
5000: Peak memory usage (for query): 5.50 GiB.
D
DC
D
DC
If b is also an array, it will be multiplied by the size of a in memory:
a[1], ['x', 'y', 'z']
a[2], ['x', 'y', 'z']
a[3], ['x', 'y', 'z']
if a has size 3 and b has size 3, we need 3 * 3 = 9 elements to keep in memory for calculations.
D
WITH (select range(1,30000) as arr) as val
select number, val from numbers(100000) where arrayExists(x-> x=number, val )
Format Null;
DC
D
set max_block_size=1;
MemoryTracker: Peak memory usage (for query): 5.16 MiB.
D
D
l
l
D
A