Getting Started

Modes (Mem / Hybrid / Disk)

OptimaDB supports three modes: Memory, Disk, and Hybrid.
The hybrid mode combines the speed of in-memory storage with the persistence of disk, giving you the best of both worlds.

Comparaison

1M row reads

1M row insert

1M updates

Memory

78ms

120ms

115ms

Hybrid

82ms

134ms

125ms

Disk

640ms

1.8s

1.62s

* Disclaimer: Benchmark results may vary depending on your hardware and OptimaDB version.

Using Modes

1 - In-Memory Database

By default, OptimaDB runs in memory mode, storing all data in RAM for the fastest possible access and lowest latency. This mode is perfect for prototyping, game servers, and any application where performance is critical.

typescript

typescript

1

2

3

4

5

2 - Disk Database

In Disk mode, OptimaDB stores all data on disk, ensuring durability and persistence even after restarts or crashes. This mode is ideal for production environments and applications where data must be reliably saved and recovered.

typescript

typescript

1

2

3

4

5

6

7

8

3 - Hybrid Database

Hybrid mode combines the speed of in-memory storage with the reliability of disk persistence. Data is kept in RAM for fast access and periodically synchronized to disk, making it suitable for applications that need both high performance and data durability.

typescript

typescript

1

2

3

4

5

6

7

8