Skip to content

Commit d558331

Browse files
authored
Update the store format page (#1421) (#1434)
Cherry-picked from #1421
1 parent 9bebafd commit d558331

File tree

2 files changed

+67
-7
lines changed

2 files changed

+67
-7
lines changed

modules/ROOT/pages/database-internals/store-formats.adoc

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ The available formats are:
1111
1212
Neo4j's newest store format is `block`.
1313
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.
1617
This allows more related data to be fetched by fewer read operations, resulting in better resource utilization.
1718

1819
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
2728

2829
=== Creating new databases
2930

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:
3244

33-
=== Changing an existing database
45+
// * Specify the store format when creating a new database using the `CREATE DATABASE` Cypher statement.
46+
// For example:
47+
// +
48+
// [source,cypher]
49+
// ----
50+
// CREATE DATABASE blockdb OPTIONS {storeFormat: 'block'}
51+
// ----
3452

35-
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.
58+
For example:
59+
+
60+
[source,shell]
61+
----
62+
neo4j-admin database migrate --to-format="block" mydb
63+
----
64+
65+
* 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.
66+
For example:
67+
+
68+
[source,shell]
69+
----
70+
neo4j-admin database copy --to-format="block" mydb blockdb
71+
----
3672

3773
Changing the store format requires that:
3874

@@ -42,6 +78,30 @@ Changing the store format requires that:
4278

4379
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.
4480

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+
45105
=== Effects of store format choice
46106

47107
The store format is responsible for how data is written to disk and how to read it.

modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ label:enterprise-only[]
409409

410410
[WARNING]
411411
====
412-
Incremental import is not supported for `block` format yet.
412+
Incremental import does not support `block` format.
413413
====
414414

415415
Incremental import allows you to incorporate large amounts of data in batches into the graph.

0 commit comments

Comments
 (0)