Materialized views
Not exactly views, yet not quite tables, materialized views sit at the intersection of these two object types and offer interesting benefits with one important caveat.
As the name suggests, materialized views are actually physical tables that store the results of a view. When the underlying data changes, the result is re-materialized automatically. This means that materialized views offer the performance of a table combined with a cached query result while offering all the security benefits of a regular view.
The only trade-off is the cost. Since materialized views store query results in physical tables, they incur related storage costs. Additionally, materialized views will use credits when refreshing the data.
Materialized views have certain limitations in the logic they permit in the SELECT
statement compared to regular views. Chief among them is that materialized views can only be built over a single data source (stages are allowed), so they cannot use...