Materialize Logo

SHOW VIEWS

SHOW VIEWS returns a list of views in your Materialize instances.

Syntax

SHOW MATERIALIZED FULL VIEWS FROM schema_name
Field Use
schema_name The schema to show sources from. Defaults to public in the current database. For available schemas, see SHOW SCHEMAS.
MATERIALIZED Only return materialized views, i.e. those with indexes. Without specifying this option, this command returns all views, including non-materialized views.
FULL Return details about your views.

Details

Output format for SHOW FULL VIEW

SHOW FULL VIEW's output is a table, with this structure:

 name  | type | materialized
-------+------+--------------
 ...   | ...  | ...
Field Meaning
name The name of the view
type Whether the view was created by the user or the system
materialized Does the view have an in-memory index? For more details, see CREATE INDEX

Changed in v0.5.0: The Name, Type, and Materialized columns are renamed to lowercase, i.e., name, type, and materialized, respectively.

Examples

Default behavior

SHOW VIEWS;
         name
-------------------------
 my_nonmaterialized_view
 my_materialized_view

Only show materialized views

SHOW MATERIALIZED VIEWS;
        name
----------------------
 my_materialized_view

Show details about views

SHOW FULL VIEWS
          name           | type | materialized
-------------------------+------+--------------
 my_nonmaterialized_view | user | f
 my_materialized_view    | user | t
CREATE VIEW my_nonmaterialized_view AS
    SELECT col2, col3 FROM my_materialized_view;