SHOW CREATE INDEX¶
SHOW CREATE INDEX
shows the statement that an index was created with. You can find the detailed information of the index, such as the property that the index is created for.
Syntax¶
SHOW CREATE {TAG | EDGE} INDEX <index_name>;
Examples¶
You can run SHOW TAG INDEXES
to list all tag indexes, and then use SHOW CREATE TAG INDEX
to show how a tag index was created.
nebula> SHOW TAG INDEXES;
+------------------+
| Names |
+------------------+
| "player_index_0" |
+------------------+
| "player_index_1" |
+------------------+
nebula> SHOW CREATE TAG INDEX player_index_1;
+------------------+--------------------------------------------------+
| Tag Index Name | Create Tag Index |
+------------------+--------------------------------------------------+
| "player_index_1" | "CREATE TAG INDEX `player_index_1` ON `player` ( |
| | `name(20)` |
| | )" |
+------------------+--------------------------------------------------+
Edge indexes can be queried through a similar approach:
nebula> SHOW EDGE INDEXES;
+----------------+
| Names |
+----------------+
| "index_follow" |
+----------------+
nebula> SHOW CREATE EDGE INDEX index index_follow;
+-----------------+-------------------------------------------------+
| Edge Index Name | Create Edge Index |
+-----------------+-------------------------------------------------+
| "index_follow" | "CREATE EDGE INDEX `index_follow` ON `follow` ( |
| | `degree` |
| | )" |
+-----------------+-------------------------------------------------+
Last update: March 29, 2021