4

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.

Jeffrey Goines
  • 935
  • 1
  • 11
  • 30

1 Answers1

5
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

Guy Coder
  • 24,501
  • 8
  • 71
  • 136