Understanding the internals of Neo4j
Having a good understanding of how Neo4j stores data can help us to build better queries. There are a few files that are important to understand how Neo4j stores data.
They are given in the following list:
nodestore.db
: This is the file that stores all the nodes. The internal node ID is indexed in this file.relationshipstore.db
: This is the file that stores all the relationships. The internal relationship ID is indexed in this file.propertystore.db
: This is the file that stores all the properties, whether they are on a node or relationship. This file does not store the large string values or array values, as they may not fit into the property record.propertystore.db.strings
: This file stores the large string values.propertystore.db.arrays
: This file stores the array property values.Schema
: This directory stores the indexes.
Let’s take a look at these store sizes for a database.