2 ms·
ClickHouse uses "grace hash" GROUP BY with the number of buckets = 256. It can do size about 256 times larger than a memory because only one bucket has to be i
by zX41ZdbW 3y ago
ClickHouse uses "grace hash" GROUP BY with the number of buckets = 256.
It can do size about 256 times larger than a memory because only one bucket has to be in memory while merging. It works for distributed query processing as well and is enabled by default.
About the linked issue - it looks like it is related to some extra optimization on top of what already exists.
- deleted 3y ago[deleted]
- riku_iki 3y ago> only one bucket has to be in memory while merging. its hard for me to judge about implementation details, but per that person reply memory is also multiplied by number of threads which do aggregation.