You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-internals/store-formats.adoc
+66-6Lines changed: 66 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,9 @@ The available formats are:
11
11
12
12
Neo4j's newest store format is `block`.
13
13
It has the best performance and supports the highest limits.
14
-
`block` format is intended to replace all the older formats.
15
-
The `block` format uses a range of different data structures and inlining techniques to achieve data locality and store related data together on disk.
14
+
15
+
The `block` format is intended to replace all the older formats.
16
+
It uses a range of different data structures and inlining techniques to achieve data locality and store related data together on disk.
16
17
This allows more related data to be fetched by fewer read operations, resulting in better resource utilization.
17
18
18
19
The older store formats are based on the original `standard` format, each with different features and limitations.
@@ -27,12 +28,47 @@ You can either set the store format when creating a new database or change the s
27
28
28
29
=== Creating new databases
29
30
30
-
The default store format of new databases is controlled by the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] configuration setting in the _neo4j.conf_ file.
31
-
Or the store format can be passed as an argument to the tool creating the database, e.g. xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-full[`neo4j-admin database import`] or xref:backup-restore/copy-database.adoc[`neo4j-admin database copy`] commands.
31
+
The default store format for all new databases is `aligned`.
32
+
If you want to change it, you can set a new value for the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] configuration in the _neo4j.conf_ file.
33
+
34
+
You can also create a new database on a specific store format by passing the new format as an argument to the command creating the database, for example, xref:tools/neo4j-admin/neo4j-admin-import.adoc#import-tool-full[`neo4j-admin database import full`] or xref:backup-restore/copy-database.adoc[`neo4j-admin database copy`] commands.
35
+
36
+
For example:
37
+
38
+
[source,shell]
39
+
----
40
+
neo4j-admin database import full ... --format=block blockdb
41
+
----
42
+
43
+
//There are several ways to create a new database in a specific store format:
32
44
33
-
=== Changing an existing database
45
+
// * Specify the store format when creating a new database using the `CREATE DATABASE` Cypher statement.
Changing the store format is possible by re-writing all data in the new format using the xref:tools/neo4j-admin/migrate-database.adoc[`neo4j-admin database migrate`] or xref:backup-restore/copy-database.adoc[`neo4j-admin database copy`] commands.
53
+
=== Changing the format of existing databases
54
+
55
+
Changing the store format is possible by re-writing all data in the new format using one of the following options:
56
+
57
+
* Migrate an existing database using xref:tools/neo4j-admin/migrate-database.adoc[`neo4j-admin database migrate`] command.
* Pass the new store format as an argument when using the xref:backup-restore/copy-database.adoc[`neo4j-admin database copy`] command to create a copy of an existing database.
@@ -42,6 +78,30 @@ Changing the store format requires that:
42
78
43
79
Changing store format can be a time-consuming operation, depending on the size and complexity of the data in the database. Performance heavily depends on the speed of the disk and the amount of available memory.
44
80
81
+
=== Verify the store format
82
+
83
+
You can verify the store format of a database using the following Cypher:
84
+
85
+
[source,cypher]
86
+
----
87
+
SHOW DATABASES YIELD name, store
88
+
----
89
+
90
+
.Result
91
+
[role="queryresult"]
92
+
----
93
+
+----------------------------------+
94
+
| name | store |
95
+
+----------------------------------+
96
+
| "blockdb" | "block-block-1.1" |
97
+
| "neo4j" | "record-aligned-1.1" |
98
+
| "system" | "record-aligned-1.1" |
99
+
+----------------------------------+
100
+
----
101
+
102
+
Additionally, you can use the `neo4j-admin database info` command to get detailed information about the store format of a database.
103
+
For details, see xref:tools/neo4j-admin/neo4j-admin-store-info.adoc[Display store information].
104
+
45
105
=== Effects of store format choice
46
106
47
107
The store format is responsible for how data is written to disk and how to read it.
0 commit comments