Appearance
Numbers
Re-run: pnpm bakeoff, hit the live API. Not a formal ClickBench submission.
DuckDB vs SQLite (≈ D1 engine)
1M ClickBench-shaped rows, same SQL, in-process.
| query | sqlite | duckdb | speedup |
|---|---|---|---|
| count | 2.2ms | 0.5ms | 4× |
GROUP BY OSName | 244ms | 10ms | 25× |
| region avg + limit | 235ms | 2.4ms | 98× |
| filter + groupby | 156ms | 7ms | 23× |
If your workload is mostly count(*), stay on D1. If it is aggs, stop arguing.
Live Cloudflare
https://pdo.b-christopher-3rd.workers.dev · Bearer demo-token
| check | result |
|---|---|
count(*) lineitem | 600,572 |
count(*) hits | 1,000,000 |
| warm lineitem count p50 wall | ~174ms |
| warm OS groupby p50 wall | ~172ms |
| client p50 (same) | ~500–800ms |
Cost sketch
Demo footprint sits near the $5/mo Workers Paid floor. R2 for ~27 MB of samples is free-tier noise.
D1 gets expensive when full scans burn rows-read. At 1M rows/groupby, the Paid 25B rows/mo allotment is roughly 25k such queries before overage dominates. Workers meter CPU ms instead. That swap is the economic argument for lake + DuckDB on this shape of traffic.
MotherDuck Lite is the fair free competitor. Business ($250) buys product. ClickHouse wins warm huge scans and ingest. Always-on CU for idle tenants is how CH bills get weird for embedded analytics.