Settings

Theme

ClickHouse Materialized Views for Fast Aggregation and Queries

highlight.io

29 points by podoman 2 years ago · 3 comments

Reader

jdpedrie 2 years ago

Shown in the article but not called out specifically, I recommend avoiding implicit tables entirely when using clickhouse materialized views. We use clickhouse for similar purposes, and there are several cases where views are listening to tables populated by another view. So [table] "events" -> [view] "mv_events_to_view1" -> [table] "view1" -> [view] "mv_view1_to_view2" -> [table] "view2". If you use implicit tables, the 2nd view will never receive data.

This document provides a ton of great information if you're doing anything with materialized views in clickhouse: https://den-crane.github.io/Everything_you_should_know_about...

HermitX 2 years ago

The work on materialized views in ClickHouse, from my perspective, is still quite rudimentary. If interested, I suggest looking into the materialized views of StarRocks. StarRocks' materialized views not only support multi-table joins and incremental updates but can also automatically rewrite query requests, so you don't have to modify your SQL statements at all.

https://celerdata.com/glossary/materialized-view

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection