Skip to content

OliviaDB against PostgreSQL

The same bank data and the same five operations, run against OliviaDB over its native protocol and against PostgreSQL over its own, on the same machine. Where the two are level, the table says so.

Results

Throughput in operations per second, 16 clients, two rounds. The ratio is OliviaDB's throughput divided by PostgreSQL's; p99 latencies are in milliseconds.

Workload Round 1: OliviaDB / PostgreSQL Ratio p99 OliviaDB / PostgreSQL Round 2: OliviaDB / PostgreSQL Ratio
Read a customer: accounts, their last 100 transactions, the card (dossier) 13,568 / 6,782 2.00× 2.95 / 6.20 13,316 / 6,790 1.96×
Payment: update a balance and insert a transaction (payment) 9,776 / 6,852 1.43× 3.03 / 3.56 9,411 / 6,888 1.37×
One week of an account's transactions (range) 28,128 / 27,976 1.01× 1.02 / 1.07 28,290 / 25,454 1.11×
A page of 50 customers (page) 24,934 / 24,512 1.02× 1.31 / 1.39 23,691 / 23,735 1.00×
Find a customer by card number (lookup) 28,698 / 29,169 0.98× 0.99 / 0.97 28,514 / 27,078 1.05×

What the numbers say:

  • Reading a whole customer is twice as fast. OliviaDB reads the customer's tree as one key range and sends it in about 10 KB; PostgreSQL's answer to the same question is about 30 KB of rows. Each client also spends less CPU on the answer: 155–160 µs against 211 µs.
  • Payments are 1.4 times as fast. A relative update ("add") and the insert commit in one transaction without a read.
  • Pages, ranges and lookups are level. These are what PostgreSQL's indexes are built for; OliviaDB matches them, using less server CPU per page (43–46 µs against 71–73 µs).

How it was measured

  • Machine. Apple M3 Max; each database in its own Docker container with 4 CPUs and 2 GiB of memory. PostgreSQL 16.6; OliviaDB from source at d56e6db.
  • Data. 10,000 customers, 2 accounts each, 100 transactions per account, one card per customer.
  • Fair terms. TLS on both sides. Both clients turn every field of every row or node into text with the same per-row allocations, so neither skips the work of reading the answer. 16 clients, one connection each, 20 s per run; two rounds in opposite order.
  • Equal answers. The dossiers were compared for 8 customers and the ranges for 40 account weeks: OliviaDB returns PostgreSQL's accounts, transactions and cards.
  • Statements. PostgreSQL runs one SQL statement per operation (a LATERAL query for the dossier, keyset paging for pages); OliviaDB runs one request. The exact statements are in bench/postgres/schema.sql and open/crates/oliviadb-bench; the workloads are defined in the lab notes.
  • Raw records. bench/published/2026-12-03/equal/ in the repository: one JSON line per run with the client and server CPU per operation and the bytes on the wire, and the host load during each round.

How the numbers got here, run by run, including the runs where PostgreSQL was ahead and what was changed in response, is in the lab notes.