Skip to main content
Materialized views cache the results of a SELECT (search or analytics) on disk. They require a local on-disk database path.

CREATE

CREATE MATERIALIZED VIEW top_tags AS
SELECT tag, COUNT(*) FROM articles GROUP BY tag

REFRESH

REFRESH MATERIALIZED VIEW top_tags
Recomputes cached rows from the current table data.

SHOW

SHOW MATERIALIZED VIEWS

DROP

DROP MATERIALIZED VIEW top_tags

DESCRIBE

DESCRIBE view_name reports row count and notes that the object is a materialized view.