You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import materializedViewDiagram from '@site/static/images/materialized-view/materialized-view-diagram.png';
10
+
9
11
# Incremental Materialized Views
10
12
11
13
Incremental Materialized Views (Materialized Views) allow users to shift the cost of computation from query time to insert time, resulting in faster `SELECT` queries.
@@ -16,11 +18,10 @@ The principal motivation for materialized views is that the results inserted int
16
18
17
19
Materialized views in ClickHouse are updated in real time as data flows into the table they are based on, functioning more like continually updating indexes. This is in contrast to other databases where materialized views are typically static snapshots of a query that must be refreshed (similar to ClickHouse [refreshable materialized views](/sql-reference/statements/create/view#refreshable-materialized-view)).
import refreshableMaterializedViewDiagram from '@site/static/images/materialized-view/refreshable-materialized-view-diagram.png';
9
+
8
10
[Refreshable materialized views](/sql-reference/statements/create/view#refreshable-materialized-view) are conceptually similar to materialized views in traditional OLTP databases, storing the result of a specified query for quick retrieval and reducing the need to repeatedly execute resource-intensive queries. Unlike ClickHouse’s [incremental materialized views](/materialized-view/incremental-materialized-view), this requires the periodic execution of the query over the full dataset - the results of which are stored in a target table for querying. This result set should, in theory, be smaller than the original dataset, allowing the subsequent query to execute faster.
9
11
10
12
The diagram explains how Refreshable Materialized Views work:
@@ -44,15 +46,15 @@ If you want to force refresh a materialized view, you can use the `SYSTEM REFRES
44
46
SYSTEM REFRESH VIEW table_name_mv;
45
47
```
46
48
47
-
You can also cancel, stop, or start a view.
49
+
You can also cancel, stop, or start a view.
48
50
For more details, see the [managing refreshable materialized views](/sql-reference/statements/system#refreshable-materialized-views) documentation.
49
51
50
52
## When was a refreshable materialized view last refreshed? {#when-was-a-refreshable-materialized-view-last-refreshed}
51
53
52
54
To find out when a refreshable materialized view was last refreshed, you can query the [`system.view_refreshes`](/operations/system-tables/view_refreshes) system table, as shown below:
0 commit comments