There are times when you will want to get a summary of your graph to, for instance, see all the labels or get a count of nodes and relationships. The Cypher below will return that information. As you'll see below, it returns the labels, relationship types and property keys. It also gives you a count of the nodes and relationships.
CALL db.labels() YIELD label
RETURN {name:'labels', data:COLLECT(label)[..1000]} AS result
UNION ALL
CALL db.relationshipTypes() YIELD relationshipType
RETURN {name:'relationshipTypes', data:COLLECT(relationshipType)[..1000]} AS result
UNION ALL
CALL db.propertyKeys() YIELD propertyKey
RETURN {name:'propertyKeys', data:COLLECT(propertyKey)[..1000]} AS result
UNION ALL
MATCH () RETURN { name:'nodes', data:count(*) } AS result
UNION ALL
MATCH ()-[]->()
RETURN { name:'relationships', data: count(*)} AS result
This will yield results like the following:
Use the following procedure to see your schema:
CALL db.schema.visualization()
To see all your indexes:
SHOW INDEXES
Comments
0 comments
Please sign in to leave a comment.