Database Comparison Matrix
Interactive strategic framework for selecting state stores based on CAP, access patterns, and operational requirements.
Workload Driven
Filter by OLTP/OLAP roles to match your access patterns.
Strategic Pros/Cons
Deep-dive into trade-offs for Senior and Staff-level reasoning.
Multi-Select Comparison
Select databases to compare side-by-side.
PostgreSQL
OLTP (can do some OLAP)
Scale
Single node: ~10kā100k simple ops/sec; sharded: 100kā1M+ cluster-wide
Consistency / CAP
Strong ACID, single-node CA; CP-ish if you add sync replication
MySQL
OLTP
Scale
Similar to Postgres: tens of thousands TPS per node; sharded: 100k+
Consistency / CAP
Strong ACID per node; CA on single node; CP-ish with strict replication
Oracle Database
OLTP (plus built-in OLAP features)
Scale
Engineered to support very high TPS in clusters; think 100k+ tx/sec
Consistency / CAP
Strong ACID; CP within cluster; focus on consistency over availability
IBM Db2 (esp. z/OS)
OLTP
Scale
Benchmarks in high thousands of ābusiness tx/secā; large banks run much higher with batching
Consistency / CAP
Strong ACID; mainframe-oriented; CP in practice
CockroachDB
OLTP (distributed SQL)
Scale
Hundreds of thousands TPS with nearālinear scale as nodes added
Consistency / CAP
Strongly consistent distributed SQL; CP by design
TiDB
OLTP + some OLAP (HTAP)
Scale
Cluster can handle hundreds of thousands to millions ops/sec across nodes
Consistency / CAP
MySQL-compatible, strongly consistent; CP-style
Azure Synapse
OLAP
Scale
Optimized for large scans; many complex queries/sec rather than per-row TPS
Consistency / CAP
Analytical engine; consistency at batch/warehouse level
kdb+ / KX
OLAP (time-series, HFT)
Scale
Millions of events/sec ingest; microsecond-level queries over billions of rows
Consistency / CAP
Strong consistency within process; more like specialized column store than general DB
TimescaleDB
OLTP/OLAP hybrid (time-series)
Scale
Hundreds of thousands rows/sec writes; sub-second queries on large series
Consistency / CAP
ACID via Postgres; CA on single node; CP-ish with sync replication
ClickHouse
OLAP (columnar)
Scale
Millions of rows/sec ingest; sub-second queries over billions of rows
Consistency / CAP
Column-oriented analytics; eventual consistency at ingestion; not ACID-focused
Cassandra
OLTP (wide-column)
Scale
Millions of writes/sec cluster-wide; very high write throughput
Consistency / CAP
Tunable consistency; AP by default (availability + partition tolerance)
ScyllaDB
OLTP (wide-column)
Scale
Millions of ops/sec with low p99 latency on modest clusters
Consistency / CAP
Tunable consistency; AP with strong options per operation
MongoDB
OLTP (document)
Scale
Single node: tens of thousands ops/sec; scaled cluster: 100k+
Consistency / CAP
Strong consistency if using majority write concern; CP-ish
Redis
OLTP-ish (KV)
Scale
Single node: hundreds of thousands to >1M ops/sec; clusters scale out
Consistency / CAP
In-memory store; single-threaded per shard; strong consistency per key in one node
Aerospike
OLTP (KV / multi-model)
Scale
Designed for millions of TPS with sub-ms latency
Consistency / CAP
Strong consistency options plus high availability; tunable
Apache Kafka
Log store / streaming, not a DB
Scale
Millions of messages/sec across cluster; very high write throughput
Consistency / CAP
Durable ordered log; not a general queryable store; consistency via offsets
Selection Strategy
OLTP vs OLAP
Latency-sensitive transactions vs large scans.
CAP Framing
Choose Consistency (CP) vs Availability (AP).
Persistence
Source of truth vs transient cache.
Access Patterns
Primary Key lookups vs Time-series aggregation.
Interview Tip
"For balances, pick CP; for clickstream, pick AP. Always justify by read/write ratio."