Disabling multi-version concurrency control for faster import: Analytics mode
Blog post from Memgraph
Memgraph, a fully ACID-compliant database, has introduced an "IN_MEMORY_ANALYTICAL" storage mode to enhance data import speed by disabling multi-version concurrency control. Traditionally, Memgraph's default "IN_MEMORY_TRANSACTIONAL" mode ensures data integrity and isolation through delta objects, which register all changes and allow for data rollback in case of transaction failure. However, this approach can slow down performance and consume significant memory during large data imports, as seen in the example of importing 1 million vertices and 5 million edges, which can consume up to 2.5 GB of RAM. The new analytical mode bypasses delta object creation, allowing quicker data imports and reducing memory usage, as demonstrated by a substantial decrease in import time and memory consumption in test scenarios. This mode, however, does not provide the same ACID guarantees, with snapshots and replication disabled due to the absence of delta objects. Users can switch between the two modes but must ensure no active transactions during the switch to maintain system integrity. The introduction of the IN_MEMORY_ANALYTICAL mode highlights Memgraph's focus on optimizing import processes, particularly for batch imports using CSV files, by improving performance and reducing resource consumption.