New: prepared statements, UPDATE and DELETE, and key lookups that seek — 0.143 ms through the gateway.Read the update

Benchmark report · SQL gateway

The OLTP path through the gateway (P3b)

Primary-key seeks, a per-session catalog cache and prepared statements: a key lookup from 5.52 ms to 0.143 ms, 10 608 lookups/s at 8 clients; aggregates same.

Run details

Date
Commit4362b9d
Hoststtiz, shared production VPS under the uf-remote caps: 3 CPUs, 6 GB.
ToolUF_BENCH=1 bash scripts/p3a-e2e-host.sh under uf-remote. Path: pgbench 16 → loopback TCP → ufgw → Unix socket → ufd --jwks; data as in the P3a report (tenant A: 10 000 orders), 10 s per run, 0 failed transactions.
Raw results
No separate raw file; the figures are those printed by pgbench in the run and recorded in the report.
Reportdocs/bench/2026-10-23-p3b-oltp.md

Indicative only. Measured on a shared development host with other services running, one node, data that fits in memory. These figures show direction, not performance to expect. The claims policy requires a dedicated host before any target is published.

Results

The tables, as written

Transcribed from the report without rounding. Bracketed values are the previous measurement where the report gives one.

pgbench, 10 s per run; P3a column from the previous report

StatementClientsP3a simple (ms)P3b simple (ms)P3b prepared (ms)P3b statements/s (best)
SELECT amount, status FROM orders WHERE id = :id15.520.1810.1436 984
same841.70.7540.76710 608
SELECT status, count(*), sum(amount) … GROUP BY status15.645.285.38189
same842.241.541.6193
INSERT INTO orders … VALUES (…)11.060.8700.9221 149
same86.806.266.171 296

Average latency, ms, log scale

P3a simple protocol vs P3b simple vs P3b prepared, one client and eight clients

P3a simple P3b simple P3b prepared
0.1110P3a simple PK ×1: 5.52 msP3b simple PK ×1: 0.181 msP3b prepared PK ×1: 0.143 msPK ×1P3a simple PK ×8: 41.7 msP3b simple PK ×8: 0.754 msP3b prepared PK ×8: 0.767 msPK ×8P3a simple GROUP BY ×1: 5.64 msP3b simple GROUP BY ×1: 5.28 msP3b prepared GROUP BY ×1: 5.38 msGROUP BY ×1P3a simple GROUP BY ×8: 42.2 msP3b simple GROUP BY ×8: 41.5 msP3b prepared GROUP BY ×8: 41.6 msGROUP BY ×8P3a simple INSERT ×1: 1.06 msP3b simple INSERT ×1: 0.87 msP3b prepared INSERT ×1: 0.922 msINSERT ×1P3a simple INSERT ×8: 6.8 msP3b simple INSERT ×8: 6.26 msP3b prepared INSERT ×8: 6.17 msINSERT ×8
What changed

Before and during this run

  • Key lookups seek: the point query reads one row instead of the tenant's 10 100.
  • The catalog is cached per session and refreshed when the node reports it stale: one node round trip less per statement.
  • Prepared statements (the extended protocol) save the parse on the client side; the gateway still binds at every Bind.
Reading

What the numbers say

The report's own reading, including what went wrong and what is still open.

  • Point lookup 5.52 ms → 0.143 ms (39×), and 8 clients reach about 10 600 lookups/s because each request now holds the engine thread for microseconds.
  • The catalog cache is visible in the simple-protocol lookup (0.285 → 0.181 ms); prepared statements add a small gain (0.181 → 0.143 ms).
  • Aggregates and inserts are unchanged: the GROUP BY reads every row on one engine thread with no parallel scan; inserts are most likely bounded by the write-ahead log sync (not profiled), and collection inserts do not yet share the raw-write group commit. Parallel reads (P3e) and group commit for inserts are the next levers.
Reproduce

Files and tools

Report

docs/bench/2026-10-23-p3b-oltp.md in the repository.

Raw results

No separate raw file; the figures are those printed by pgbench in the run and recorded in the report.

Access

The repository is private during development. Early-access teams receive the build, the benchmark scripts and the raw files.

See the measurements in context.

The performance page draws the latest figure from each area and states what is not measured yet.