Is there an efficient way to know all node/edge labels? #1109
Replies: 1 comment 1 reply
-
You can execute: select from schema:types To have all the defined types. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'd like to fetch all the unique node labels that are used in a DB. Similarly, I'd like to know all the edge labels (long story, I want to write a script to index a given property for all the types, eg,
CREATE INDEX ON $type ( uri )
for each type; obviously, I'm assuming all the type instances have such a property).I know how to do that in gremlin:
But likely, this will scan all the nodes/labels and will be very slow in large databases. Or not? Is there a way that queries schema information? Similarly, are there SQL commands to query the schema, eg, SHOW ALL TABLES, DESCRIBE TABLE, etc?
Beta Was this translation helpful? Give feedback.
All reactions