Skip to main content
All comparisons/ScramDB vs TiDB

ScramDB vs TiDB

TiDB’s HTAP works by keeping your data twice: rows in TiKV for transactions, a columnar replica in TiFlash for analytics, kept in step by asynchronous Raft Learner replication. It is a real architecture and it is two copies, two engines and a lag to reason about. ScramDB is one columnar copy that serves both, on one node if you want, and it answered the same queries 112x faster than the TiFlash side did.

Faster
112x
ScramDB 31.6s against TiDB (TiFlash only) 3,533s. TiFlash columnar replica, 2 queries unanswered.
Faster from cold
23x
ScramDB 189s against TiDB (TiFlash only) 4,373s. First touch, nothing cached.
Faster to load
5.2x
ScramDB 717s against TiDB (TiFlash only) 3,748s. Full 100M row ingest.
Smaller on disk
3.6x
ScramDB 16.1 GiB against TiDB (TiFlash only) 57.4 GiB. Same data, after load.
At a glance

Side by side

ScramDBTiDB
Copies of your dataOne. The analytical query reads the row the transaction just wroteTwo. TiKV rows plus a TiFlash columnar replica per table you opt in
Consistency for analyticsThe same live data every other reader seesColumnar replicas are asynchronously replicated as Raft Learners; consistency is reached by validating the Raft index at read time
SetupOne static binary. Clustering is opt-in configuration, not extra processesPD, TiKV, TiDB and TiFlash processes, 3 or more of the first two
IsolationSerializable isolation, with read committed and repeatable read availableSnapshot isolation, labelled Repeatable Read. Percolator two-phase commit through a timestamp oracle
Wire protocolPostgreSQL wire protocolMySQL protocol. Stored procedures, triggers and events are documented as unsupported
Procedures and triggersPL/pgSQL procedures, row, statement, INSTEAD OF and event triggersNot supported
AI and agentsA semantic layer built into the engine that AI agents connect to directly, bound by the caller’s own permissionsNone built in
LicenseCommunity free to 64 GiB stored, Enterprise for clusteringApache 2.0 for the core

The second copy is the product

TiFlash exists because TiKV cannot answer analytical queries at speed, which is an honest engineering answer to a real problem. The cost is that every table you want to query analytically must be explicitly given a TiFlash replica, that replica lands asynchronously, and your operational footprint now includes a fourth component.

The columnar side of TiDB answered in 3,533 seconds, and left two queries unanswered. ScramDB answered all of them in 31.56 seconds, from the only copy it keeps.

One engine, one copy, one snapshot

ScramDB is UTAP rather than HTAP, and the distinction is exactly this: there is no second copy to keep in sync. The columnar store is the transactional store. A dashboard reading a metric sees the write that committed a millisecond ago because it is reading the same rows, not a replica of them.

When TiDB is the right answer

MySQL-protocol applications that need horizontal write scaling first and analytics second, with a team that is comfortable operating a multi-component distributed system. TiDB is Apache-2.0, mature and widely deployed at scale.

The measurement, as of 5 September 2026. A full analytical workload over 100 million rows of real web analytics data, run on a 16 vCPU AWS instance. Ours is a single ScramDB node in its stock configuration, with the GPU off and nothing tuned for the test. Rival figures are those systems’ own published results for the same instance type. These are the numbers as of that date, not a permanent scoreboard: the engine is tuned continuously and it has got faster through every round of this work, so a later run should read better than this one.

Run it yourself in one line

One static binary, no dependencies. It picks its own config, listens on the postgres port 5432 and runs in the background.

$curl -fsSL https://scramdb.com/install | bash

Quick start · How the engine works · Talk to us

A full analytical workload over 100 million rows of real web analytics data, run on a 16 vCPU AWS instance, measured 5 September 2026. Ours is a single ScramDB node in its stock configuration, with the GPU off and nothing tuned for the test. Rival figures are those systems’ own published results for the same instance type. These are the numbers as of that date, not a permanent scoreboard: the engine is tuned continuously and it has got faster through every round of this work, so a later run should read better than this one.