4 ms·
How does Clickhouse handle downstream aggregations? E.g... SELECT AVG(col) FROM (SELECT MAX(col2) AS col FROM table GROUP BY col3) t; type query? Essentiall
by CHY872 4y ago
How does Clickhouse handle downstream aggregations? E.g...
SELECT AVG(col) FROM (SELECT MAX(col2) AS col FROM table GROUP BY col3) t;
type query? Essentially, materialized views which are very unstable? Flink has its retract streams where rows can be semantically removed from the output and downstream query plans can understand deletes, but my expectation has been that these have bad worst case performance.
- zX41ZdbW 4y agoIt does not handle deletes / updates of the source table at all - it means the data of the materialized view become unaffected. Nothing sophisticated... About the multi-level aggregate queries - the only way is to define a materialized view for the inner query and do calculations on top of it on the fly. So, the data for the inner query will be pre-aggregated, but nothing on top of that.