Get All Relationship Types Defined in Current Database

1.4k Views Asked by At

Is there any efficient way to get all relationship types currently defined?

I know this works:

match ()-[r]-() RETURN DISTINCT TYPE(r)

But I guess this will consume significant time if the number of relationships is huge and there is no inherent indexing under the hood.

1

There are 1 best solutions below

0
On BEST ANSWER
CALL db.relationshipTypes()

To learn more about what mysteries a graph holds see
How to get a high level inventory of objects in your graph


At https://neo4j.com/download/ you can down load Neo4j desktop which will install a local copy of Neo4j server. Here is the online guide.

In there is a list of sample queries to help you learn about a database.

enter image description here