SHOW CREATE INDEX

SHOW CREATE INDEX returns the DDL statement used to create the index.

Syntax

SHOW CREATE INDEX index_name
Field Use
index_name The index you want use. You can find available index names through SHOW INDEXES.

Examples

SHOW INDEXES FROM my_view;
     name    | on  | cluster    | key
-------------+-----+------------+--------------------------------------------
 my_view_idx | t   | quickstart | {a, b}
SHOW CREATE INDEX my_view_idx;
              name              |                                           create_sql
--------------------------------+------------------------------------------------------------------------------------------------
 materialize.public.my_view_idx | CREATE INDEX "my_view_idx" IN CLUSTER "default" ON "materialize"."public"."my_view" ("a", "b")

Privileges

The privileges required to execute this statement are:

  • USAGE privileges on the schema containing the index.
Back to top ↑