SHOW CREATE INDEX
SHOW CREATE INDEX
展示创建Tag或者Edge type时使用的nGQL语句,其中包含索引的详细信息,例如其关联的属性。
语法
SHOW CREATE {TAG | EDGE} INDEX <index_name>;
示例
用户可以先运行SHOW TAG INDEXES
查看有哪些Tag索引,然后用SHOW CREATE TAG INDEX
查看指定索引的创建信息。
nebula> SHOW TAG INDEXES;
+------------------+--------------+-----------------+
| "player_index_0" | "player" | ["name"] |
+------------------+--------------+-----------------+
| "player_index_1" | "player" | ["name", "age"] |
+------------------+--------------+-----------------+
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 type索引可以用类似的方法查询:
nebula> SHOW EDGE INDEXES;
+----------------+----------+---------+
| Index Name | By Edge | Columns |
+----------------+----------+---------+
| "follow_index" | "follow" | [] |
+----------------+----------+---------+
nebula> SHOW CREATE EDGE INDEX follow_index;
+-----------------+-------------------------------------------------+
| Edge Index Name | Create Edge Index |
+-----------------+-------------------------------------------------+
| "follow_index" | "CREATE EDGE INDEX `follow_index` ON `follow` ( |
| | )" |
+-----------------+-------------------------------------------------+
历史版本兼容性
Nebula Graph 2.0.1中, SHOW TAG/EDGE INDEXES
语句仅返回 Names
。
最后更新: August 17, 2021
当前内容版权归 Nebula Graph 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Nebula Graph .