EC2: 1 x i3.large node (2 cores, 15.25 GB RAM, 1 x 0.475 NVMe SSD )
Clickhouse-server: v 1.1.54383
OS: Ubuntu 16.04
1.41 billion rows, size ~100GB compressed
Engine: AggregatingMergeTree
Query: group by 16 columns including joined metadata from dicts and high-cardinality columns: session/user_id. Each group supposed to aggregate 1-180 rows.
CREATE MATERIALIZED VIEW test.src_aggr_view
ENGINE = AggregatingMergeTree(date, (col1, .., col_n), 8192) POPULATE AS
SELECT ... FROM source_table GROUP BY col1, .., col_nResult
Query result doesn't fit into RAM and execution fails very quickly:
↘ Progress: 17.69 million rows, 3.14 GB (294.63 thousand rows/s., 52.25 MB/s.) █▌ 1%Received exception from server (version 1.1.54383):
Code: 173. DB::Exception: Received from 172.18.37.183:9000. DB::Exception: Allocator: Cannot mmap 128.00 MiB., errno: 12, strerror: Cannot allocate memory.
0 rows in set. Elapsed: 60.640 sec. Processed 17.69 million rows, 3.14 GB (291.80 thousand rows/s., 51.75 MB/s.)
| a | maxMerge(max_b) |
| 2018-08-07 | 99 |
| 2018-08-08 | 999 |
| 2018-08-09 | 999999999 |
col1, .., col_n