4 ms·
DBs with Materialized Views Here is the syntax for Snowflake. CREATE MATERIALIZED VIEW mymv COMMENT='filtered view' AS SELECT * FROM mytable WHERE
by rawgabbit 3y ago
DBs with Materialized Views
Here is the syntax for Snowflake.
CREATE MATERIALIZED VIEW mymv
COMMENT='filtered view'
AS
SELECT * FROM mytable WHERE isdeleted=0;
- setr 3y agoWhy materialize? A normal view is sufficient
- rawgabbit 3y agoIt was to answer the OP question. Querying a materialized view is essentially the same as querying the original table. The MV allows for automated indexes etc.
- setr 3y agoI mean... a normal view hits all of the same properties, and is literally querying the original table. Materialization is an entirely orthogonal concern as far as I can think of.