Name of the materialized view
The SELECT query that defines the materialized view
OptionalschemaSchema to create the materialized view in (PostgreSQL)
OptionalifIf true, uses CREATE MATERIALIZED VIEW IF NOT EXISTS
OptionalreplaceIf true, uses CREATE OR REPLACE MATERIALIZED VIEW
OptionalwithColumns to include in the WITH DATA clause (for initial data load)
OptionaluniqueUnique index name for CONCURRENTLY refresh support
OptionalcommentOptional comment for the materialized view
OptionalbuildBuild mode: IMMEDIATE or DEFERRED (Oracle)
OptionalrefreshRefresh method: FAST, COMPLETE, or FORCE (Oracle)
OptionalonRefresh timing: COMMIT or DEMAND (Oracle)
OptionalrefreshOngoing maintenance mode: 'IMMEDIATE' keeps the materialized view in
sync automatically on every write to a base table; 'DEFERRED' only
updates it when explicitly refreshed (Db2: REFRESH IMMEDIATE|DEFERRED).
This is independent of withData, which only controls whether the view
is populated at creation time. Defaults to 'DEFERRED' to avoid the perf
cost of continuous auto-maintenance unless explicitly requested.
Options for creating a materialized view