Skip to main content
All comparisons/ScramDB vs Apache Spark

ScramDB vs Apache Spark

Spark SQL is a processing engine over other people’s storage: a driver, executors and a cluster manager, with no persistent storage of its own and no cross-table ACID guarantees in core Spark SQL. It is built for large batch pipelines, and it is the thing your data leaves the database to reach. ScramDB answered the same analytical workload 10 times faster, from one process, on the data it already holds.

Faster
11x
ScramDB 31.6s against Spark 332s. Both answered every query.
Faster from cold
2.1x
ScramDB 189s against Spark 404s. First touch, nothing cached.
At a glance

Side by side

ScramDBApache Spark
What it isA databaseA distributed processing engine over external storage
Owns the dataYes: its own storage, with real transactions behind itNo: files and tables in other systems
TransactionsFull ACID up to serializable isolationNot part of core Spark SQL; it depends on the table format underneath
What you deployOne binary, one processA driver, executors and a cluster manager such as YARN or Kubernetes
LatencyInteractive: a query is a queryJob oriented, with scheduling and startup in the path
Constraints and triggersForeign keys, CHECK constraints, triggers, proceduresNot part of the engine
Wire protocolPostgreSQL wire protocol, every standard driver and BI toolJDBC and ODBC through the thrift server, or its own APIs
AI and agentsA semantic layer inside the engine that agents connect to directly, bound by the caller’s own permissionsMLlib and the wider ecosystem, outside the SQL surface

The pipeline exists because the database was slow

Most Spark jobs exist to do something the database could not: scan a lot of rows and aggregate them. When the database answers that in seconds on the live data, a large part of the pipeline stops earning its keep, along with the cluster it runs on and the copy it reads.

When Spark is the right answer

Genuine data engineering at petabyte scale, machine learning pipelines, and transformation work over many heterogeneous sources. Spark is the standard for that and it is Apache 2.0.

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.