TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

ClickHouse Materialized Views for Fast Aggregation and Queries

29 pointsby podomanover 1 year ago

2 comments

jdpedrieover 1 year 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] &quot;events&quot; -&gt; [view] &quot;mv_events_to_view1&quot; -&gt; [table] &quot;view1&quot; -&gt; [view] &quot;mv_view1_to_view2&quot; -&gt; [table] &quot;view2&quot;. If you use implicit tables, the 2nd view will never receive data.<p>This document provides a ton of great information if you&#x27;re doing anything with materialized views in clickhouse: <a href="https:&#x2F;&#x2F;den-crane.github.io&#x2F;Everything_you_should_know_about_materialized_views_commented.pdf" rel="nofollow">https:&#x2F;&#x2F;den-crane.github.io&#x2F;Everything_you_should_know_about...</a>
HermitXover 1 year 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&#x27; materialized views not only support multi-table joins and incremental updates but can also automatically rewrite query requests, so you don&#x27;t have to modify your SQL statements at all.<p><a href="https:&#x2F;&#x2F;celerdata.com&#x2F;glossary&#x2F;materialized-view" rel="nofollow">https:&#x2F;&#x2F;celerdata.com&#x2F;glossary&#x2F;materialized-view</a>