Materialize Documentation
s
Join the Community github/materialize

SHOW INDEX

SHOW INDEX provides details about a materialized view’s indexes.

Syntax

SHOW INDEX INDEXES KEYS FROM IN on_name LIKE pattern WHERE expr
Field Use
on_name The name of the object whose indexes you want to show. This can be the name of a table, source, or view.

Details

Output format

SHOW INDEX’s output is a table, with this structure:

cluster | on_name | key_name | seq_in_index | column_name | expression | nullable | enabled
--------+---------+----------+--------------+-------------+------------+----------+--------
 ...    | ...     | ...      | ...          | ...         | ...        | ...      | ...
Field Meaning
cluster The name of the cluster containing the index.
on_name The name of the table, source, or view the index belongs to.
key_name The name of the index.
seq_in_index The column’s position in the index.
column_name The indexed column.
expression An expression used to generate the column in the index.
null Is the column nullable?
enabled Does the index represent an arrangement? false only in the case of Disabling user indexes.

Changed in v0.5.0: The output columns are renamed from On_name, Key_name, Column_name, Expression, Null, and Seq_in_index to on_name, key_name, column_name, expression, nullable, and seq_in_index, respectively.

New in v0.23.0: The cluster column.

Determine which views have indexes

SHOW FULL VIEWS includes details about which views have indexes, i.e. are materialized.

Examples

SHOW FULL VIEWS;
          name           | type | materialized
-------------------------+------+ -------------
 my_nonmaterialized_view | user | f
 my_materialized_view    | user | t
SHOW INDEXES FROM my_materialized_view;
 on_name | key_name | seq_in_index | column_name | expression | nullable | enabled
---------+----------+--------------+-------------+------------+----------+--------
 ...     | ...      | ...          | ...         | ...        | ...      | ...