SingleStore DB

What is the advantage of SingleStore DB 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, SingleStore DB has four distinguishing memory-optimized features that enable it to perform significantly better than disk-based storage engines running in memory:

  • SingleStore DB is a distributed scale-out system. SingleStore DB 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. SingleStore DB 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, SingleStore DB compiles SQL down to native code for maximum performance.