Skip to main content
All comparisons/ScramDB vs MongoDB

ScramDB vs MongoDB

MongoDB stores every document with its keys, reads it whole, and has no documented columnar or vectorized scan engine to aggregate a hundred million of them with. Its transactions carry a documented 60 second default limit, a 16 MB oplog entry cap and guidance to modify no more than a thousand documents. ScramDB gives you SQL with real joins, foreign keys and serializable transactions with none of those ceilings, on a columnar engine built for exactly the aggregation MongoDB was not.

Transactions
No ceiling
MongoDB documents a 60 second default limit, a 16 MB oplog entry cap and guidance of 1,000 documents or fewer per transaction.
Query surface
Full SQL
Joins, window functions and CTEs, rather than an aggregation pipeline and $lookup.
Analytics
Columnar
No documented columnar or vectorized scan engine for large aggregations.
License
Not SSPL
MongoDB Community is SSPL, which is neither OSI nor FSF approved.
At a glance

Side by side

ScramDBMongoDB
Data modelRelational with full SQL, plus JSONB when you want documentsBSON documents, queried through the aggregation pipeline
StorageColumnar and compressed: 16 GiB for the same dataWiredTiger document store, snappy block compression
ExecutionQueries compile to native machine code and run on every core: 31.6 seconds for the whole analytical workloadAggregation pipeline. No documented columnar or vectorized scan engine
TransactionsFull ACID up to serializable isolation, with no document count or duration ceiling on a transactionMulti-document ACID on replica sets and sharded clusters, with a documented 60 second default limit, a 16 MB oplog entry cap and guidance of 1,000 documents or fewer per transaction
JoinsEvery SQL join, including LATERAL, on indexed columns$lookup in the pipeline
Wire protocolPostgreSQL wire protocol, every standard driver and BI toolMongoDB drivers
AI and agentsA semantic layer built into the engine that AI agents connect to directly, bound by the caller’s own permissionsAtlas Vector Search, documented as a managed-cloud capability
LicenseCommunity free to 64 GiB stored, Enterprise beyondSSPL v1, which is neither OSI nor FSF approved

A document store reads documents

Aggregating a hundred million records in MongoDB means reading a hundred million whole documents, keys included, through a pipeline with no columnar or vectorized scan engine underneath it. That is not a criticism of MongoDB’s engineering, it is what the storage model implies.

ScramDB reads only the columns a query touches, skips whole blocks that cannot match, and compiles the query to native machine code. The same question costs a fraction of the work.

Flexible schema without giving up SQL

If the reason you are on MongoDB is that the shape of your data changes, ScramDB has JSONB with the operators and indexes to go with it, inside a relational database with foreign keys, constraints and serializable transactions. You get the flexible column where you need one and a real schema everywhere else, plus joins that are joins.

When MongoDB is the right answer

Deeply nested documents that are read and written whole, horizontal write scaling through native sharding, and teams who want to move fast without a schema conversation. MongoDB is good at that and its sharding story is mature.

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.