What is the advantage of SingleStoreDB over traditional databases like Oracle, SQL Server or MySQL with data in a ramdisk or large buffer pools?

Two common techniques for leveraging large amounts of memory in traditional databases are storing data files on a ramdisk or running a disk-based storage engine with a large buffer pool. For example, MySQL performs much better with InnoDB configured to use a large buffer pool.

While running an existing storage engine like InnoDB in memory can alleviate some of the bottlenecks involved with disk, SingleStoreDB has four distinguishing memory-optimized features that enable it to perform significantly better than disk-based storage engines running in memory:

  • SingleStoreDB is a distributed scale-out system. SingleStoreDB scales to thousands of machines on commodity hardware.

  • No buffer pool. Traditional databases manage a global buffer pool since they assume that the dataset can’t fit into memory. The buffer pool is a resource shared across all databases and all tables, which creates significant contention.

  • Lock-free data structures. SingleStoreDB uses memory-optimized, lock-free skip lists and hash tables as its indexes. Unlike B+ Trees, these data structures are designed from the ground up to be fast in memory.

  • Code generation. Lock-free data structures are so fast that dynamic SQL interpretation quickly becomes the limiting factor for query execution. With code generation, SingleStoreDB compiles SQL down to native code for maximum performance.