{"slug":"cloudflare-os-d1","verification":{"valid":false,"broken_at":1,"reason":"hash mismatch"},"count":30,"sources":[{"id":"s1","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/","title":"Cloudflare D1 overview","quote":"D1 allows you to create thousands of databases at no extra cost for isolation, perfect for scaling out application vibe-coding platforms.","summary":"Vendor overview of D1's managed serverless SQL surface and scale-out model.","publisher":"Cloudflare","claim_ids":["c1"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"genesis","hash":"8421f7c951b1b6b9f91b002ccb5cb1e3daa62151e347872d3d67ae971d605deb"},{"id":"s2","type":"specification","url":"https://developers.cloudflare.com/d1/platform/limits/","title":"D1 limits","quote":"D1 is designed for horizontal scale out across multiple, smaller (10 GB) databases, such as per-user, per-tenant or per-entity databases.","summary":"Normative limits for database size, stored values, statements, bindings, query duration and account storage.","publisher":"Cloudflare","claim_ids":["c15","c3","c9"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"8421f7c951b1b6b9f91b002ccb5cb1e3daa62151e347872d3d67ae971d605deb","hash":"e24e1cedd34c589f64fa47d14121075cac52d8a0f1f80c9eb40617979e521003"},{"id":"s3","type":"specification","url":"https://developers.cloudflare.com/d1/platform/pricing/","title":"D1 pricing","quote":"A query that filters on an unindexed column may return fewer rows to your Worker, but is still required to read (scan) more rows to determine which subset to return.","summary":"The row-read, row-write and storage meters, including the extra written row charged for an index update.","publisher":"Cloudflare","claim_ids":["c22","c4","c6"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"e24e1cedd34c589f64fa47d14121075cac52d8a0f1f80c9eb40617979e521003","hash":"b59c5d16477943fd6f0f87f12b7fcf494f6e10b15d407c2ac8e59a717a15f6f6"},{"id":"s4","type":"specification","url":"https://developers.cloudflare.com/d1/worker-api/d1-database/","title":"D1Database API","quote":"Sends multiple SQL statements inside a single call to the database. This can have a huge performance impact as it reduces latency from network round trips to D1.","summary":"Binding API contract for prepare, batch, exec, dump and Sessions.","publisher":"Cloudflare","claim_ids":["c10"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"b59c5d16477943fd6f0f87f12b7fcf494f6e10b15d407c2ac8e59a717a15f6f6","hash":"c12a128be84bce212670195b07768943d098b6a2f1733bb9db182f997263486a"},{"id":"s5","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/observability/debug-d1/","title":"Debug D1","quote":"D1 DB is overloaded. Requests queued for too long.","summary":"Exact D1 error strings with Cloudflare's stated cause and operator action.","publisher":"Cloudflare","claim_ids":["c23"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"c12a128be84bce212670195b07768943d098b6a2f1733bb9db182f997263486a","hash":"40b7b3301adb9d3430945ba7556b016924b79aa15b404b92a71ec4abf9913cb2"},{"id":"s6","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/best-practices/use-indexes/","title":"Use indexes","quote":"Indexes enable D1 to improve query performance over the indexed columns for common (popular) queries by reducing the amount of data (number of rows) the database has to scan when running a query.","summary":"Index selection, EXPLAIN QUERY PLAN and the scan reduction mechanism.","publisher":"Cloudflare","claim_ids":["c5"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"40b7b3301adb9d3430945ba7556b016924b79aa15b404b92a71ec4abf9913cb2","hash":"691f549cc526479363de2793bd9f8df91315ea93f074389aeb2d279432b4bd1c"},{"id":"s7","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/best-practices/read-replication/","title":"Use read replication","quote":"To use read replication, you must use the D1 Sessions API, otherwise all queries will continue to be executed only by the primary database.","summary":"Read replica activation, Sessions bookmarks and sequential consistency.","publisher":"Cloudflare","claim_ids":["c14"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"691f549cc526479363de2793bd9f8df91315ea93f074389aeb2d279432b4bd1c","hash":"1045b4ffd8f47e2d0fb1ba13afc89161fb9573926b3148226436752fc5f11ed4"},{"id":"s8","type":"publisher_documentation","url":"https://developers.cloudflare.com/workers/configuration/smart-placement/","title":"Smart Placement","quote":"Smart Placement may take up to 15 minutes to analyze your Worker after deployment.","summary":"Placement mechanism, traffic requirements, analysis delay and rollback behavior.","publisher":"Cloudflare","claim_ids":["c13"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"1045b4ffd8f47e2d0fb1ba13afc89161fb9573926b3148226436752fc5f11ed4","hash":"e63f65a646a215b0e8d96e95486256ddd132358c2bcef22d7774cde442379543"},{"id":"s9","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/reference/migrations/","title":"D1 migrations","quote":"However, the binding name can change, whereas the database name cannot.","summary":"Exact create, list and apply workflow and the migration-ledger behavior.","publisher":"Cloudflare","claim_ids":["c17"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"e63f65a646a215b0e8d96e95486256ddd132358c2bcef22d7774cde442379543","hash":"42a7015aa2517351f7ea8b2abf090e4d26098fca6a85ff22b4e7effb282bc506"},{"id":"s10","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/reference/time-travel/","title":"D1 Time Travel","quote":"Time Travel is D1's approach to backups and point-in-time-recovery, and allows you to restore a database to any minute within the last 30 days.","summary":"Point-in-time bookmarks and restore semantics for a whole D1 database.","publisher":"Cloudflare","claim_ids":["c20"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"42a7015aa2517351f7ea8b2abf090e4d26098fca6a85ff22b4e7effb282bc506","hash":"9c7d364eaefb088b59fe43efcad93d7f9f1c02496b36ee0e75e346eb3426d8d8"},{"id":"s11","type":"publisher_documentation","url":"https://developers.cloudflare.com/durable-objects/best-practices/access-durable-objects-storage/","title":"SQLite-backed Durable Objects","quote":"Cloudflare recommends all new Durable Object namespaces use the SQLite storage backend.","summary":"Official alternative where application code and SQLite state share the Durable Object.","publisher":"Cloudflare","claim_ids":["c1","c2"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"9c7d364eaefb088b59fe43efcad93d7f9f1c02496b36ee0e75e346eb3426d8d8","hash":"90d055d50f766d86552e6ce14248194b650b1e79ac11f92b73149d7a9205d97e"},{"id":"s12","type":"publisher_documentation","url":"https://developers.cloudflare.com/hyperdrive/","title":"Cloudflare Hyperdrive","quote":"Accelerate access to your existing databases from Cloudflare Workers with Hyperdrive's global connection pooling and query caching.","summary":"Official path for keeping Postgres or MySQL while pooling Worker connections.","publisher":"Cloudflare","claim_ids":["c21"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"90d055d50f766d86552e6ce14248194b650b1e79ac11f92b73149d7a9205d97e","hash":"133fd89a7a9c714e0ed5ce82f8cbdfede5c34cbaadf57bdc90c47395513ce84c"},{"id":"s13","type":"repository","url":"https://github.com/cloudflare/workers-sdk","title":"Cloudflare workers-sdk","quote":"Home to Wrangler, the CLI for Cloudflare Workers®","summary":"Public Wrangler source repository containing D1 CLI, migration and API implementations.","publisher":"GitHub","claim_ids":["c17"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"133fd89a7a9c714e0ed5ce82f8cbdfede5c34cbaadf57bdc90c47395513ce84c","hash":"1e764519b519d5d92518c9cd18ebef180a0188d1490752d13b5a9d41e94845ba"},{"id":"s14","type":"independent_measurement","url":"https://news.ycombinator.com/item?id=43607264","title":"Independent Workers database latency comparison","quote":"Using CF Workers + DigitalOcean Postgres, I was seeing query responses in the 50-100ms range.","summary":"Named operator comparison: Workers plus DigitalOcean Postgres at 50–100 ms versus Workers plus D1 at 300–3000 ms, both with Smart Placement.","author":"fastball","publisher":"Hacker News","date":"2025-04-07","claim_ids":["c11"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"1e764519b519d5d92518c9cd18ebef180a0188d1490752d13b5a9d41e94845ba","hash":"c9477ca3d6e0dcc2ace8081957baf051bbebe63b753a9fcf38fa468e76590766"},{"id":"p1","type":"hn","url":"https://news.ycombinator.com/item?id=43607561","title":"Journey to Optimize Cloudflare D1 Database Queries","quote":"Using D1 in production for over an year on multiple projects - I can confirm response times to simple queries regularly take 400ms and beyond. On top there's constant network, connection and a plethora of internal errors.","summary":"Over a year of D1 in production across multiple projects. Reports 400ms+ on simple queries plus constant network, connection and internal errors, and explicitly does not recommend D1 for production. Negative.","author":"StanAngeloff","publisher":"Hacker News","date":"2025-04-07","claim_ids":["c11"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"c9477ca3d6e0dcc2ace8081957baf051bbebe63b753a9fcf38fa468e76590766","hash":"ef77f015403fbe7f36664df18308c1a517b258de607cd1a78253c7395dd66fd3"},{"id":"p2","type":"hn","url":"https://news.ycombinator.com/item?id=43607264","title":"Journey to Optimize Cloudflare D1 Database Queries","quote":"I evaluated D1 for a project a few months ago, and found that global performance was pretty terrible.","summary":"Evaluated D1 and rejected it on global TTFB. In a follow-up in the same thread reports Workers+DigitalOcean Postgres at 50-100ms vs Workers+D1 at 300-3000ms, both with Smart Placement on. Negative.","author":"fastball","publisher":"Hacker News","date":"2025-04-07","claim_ids":["c11"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"ef77f015403fbe7f36664df18308c1a517b258de607cd1a78253c7395dd66fd3","hash":"83bacd078e3af20e6568c5c34af979f1604e8f79e3429491505829e1e92f3653"},{"id":"p3","type":"hn","url":"https://news.ycombinator.com/item?id=43614249","title":"Journey to Optimize Cloudflare D1 Database Queries","quote":"Another fun limitation is that a transaction cannot span multiple D1 requests, so you can't select from the database, execute application logic, and then write to the database in an atomic way.","summary":"Hit D1's lack of multi-request transactions and worked around it by packing a precondition check into the first statement of a batch that deliberately throws a JSON parse error to abort the rest. Says anything more complex would need temp tables and logic pushed into SQL. Negative.","author":"kpozin","publisher":"Hacker News","date":"2025-04-07","claim_ids":["c10"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"83bacd078e3af20e6568c5c34af979f1604e8f79e3429491505829e1e92f3653","hash":"71aa7517cd44e23fc88645b07bccc56dd0ef399e2de8606bd8d603cf3fd48af3"},{"id":"p4","type":"hn","url":"https://news.ycombinator.com/item?id=43610222","title":"Journey to Optimize Cloudflare D1 Database Queries","quote":"It’s not possible to set up per-user data in D1. Like in theory you probably could, but the DX infrastructure to make it possible is non-existent - you have to explicitly bind each database into your worker.","summary":"Tried the documented per-tenant D1 sharding pattern and found it impractical because every database must be explicitly bound into the Worker. Says a Cloudflare person on Discord confirmed Durable Objects is the only real path to tenancy sharding. Negative.","author":"vlovich123","publisher":"Hacker News","date":"2025-04-07","claim_ids":["c15"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"71aa7517cd44e23fc88645b07bccc56dd0ef399e2de8606bd8d603cf3fd48af3","hash":"0b0e9c14947305ebb868bb43ef2a44206cc6a8e7012d7d9ff98b8ad270c3d76d"},{"id":"p5","type":"hn","url":"https://news.ycombinator.com/item?id=47797766","title":"Cloudflare's AI Platform: an inference layer designed for agents","quote":"D1 reliability has been bad in our experience. We've had queries hanging on their internal network layer for several seconds, sometimes double digits over extended periods (on the order of weeks).","summary":"Production user reporting multi-second to double-digit-second hung D1 queries persisting for weeks, plain network exceptions between Worker and D1 hosts, and hung queries invisible in the observability dashboard. Also cites no transactions. Negative.","author":"eis","publisher":"Hacker News","date":"2026-04-16","claim_ids":["c12"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"0b0e9c14947305ebb868bb43ef2a44206cc6a8e7012d7d9ff98b8ad270c3d76d","hash":"fbcc7f9bf2f2436d1e6b2e70ebc05b030adf5d113f5b011b3a67aef733c73df7"},{"id":"p6","type":"github","url":"https://github.com/cloudflare/workers-sdk/issues/14101","title":"Workflows (local `wrangler dev`): a ~200 KB `Uint8Array` step output fails with `string or blob too big: SQLITE_TOOBIG`, but the same bytes as an `ArrayBuffer` (or a 2 MB string) succeed","quote":"Workflows (local `wrangler dev`): a ~200 KB `Uint8Array` step output fails with `string or blob too big: SQLITE_TOOBIG`, but the same bytes as an `ArrayBuffer` (or a 2 MB string) succeed","summary":"Filed a minimal reproduction where a ~200 KB Uint8Array step output aborts the whole run with SQLITE_TOOBIG under the local Workflows engine, while identical bytes as an ArrayBuffer or a 2 MB string are fine. Negative — the SQLite size ceiling surfacing through the serialization path.","author":"danieltroger","publisher":"GitHub — cloudflare/workers-sdk","date":"2026-05-29","claim_ids":["c8"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"fbcc7f9bf2f2436d1e6b2e70ebc05b030adf5d113f5b011b3a67aef733c73df7","hash":"551fbf82a161b203110c412d319ec4cf8858c734fca14a594781ce5b0e38bcf4"},{"id":"p7","type":"hn","url":"https://news.ycombinator.com/item?id=43608066","title":"Journey to Optimize Cloudflare D1 Database Queries","quote":"I am running 2 production apps on Cloudflare workers, both using D1 for primary storage. I found the performance ok, especially after enabling Smart Placement [1].","summary":"Runs two production apps with D1 as primary storage and finds performance acceptable once Smart Placement is enabled. The dissenting positive voice in an otherwise negative thread.","author":"freetonik","publisher":"Hacker News","date":"2025-04-07","claim_ids":["c11"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"551fbf82a161b203110c412d319ec4cf8858c734fca14a594781ce5b0e38bcf4","hash":"9da82063de66ce1ad721b450dc034701ea493e8ac4829e9201e4db1e969a20cb"},{"id":"p8","type":"hn","url":"https://news.ycombinator.com/item?id=48611834","title":"Temporary Cloudflare accounts for AI agents","quote":"It's almost always better to use Durable Objects storage, rather than D1. Even if you only want a single global database, it's better to implement that as a singleton Durable Object, than by using D1.","summary":"The Workers architect states D1 is literally a singleton Durable Object wrapping SQLite, so raw DOs give you code co-located with the database and near-zero query latency. Says D1 exists mainly for familiarity, with read replicas the one remaining D1 advantage. Positive on DOs, blunt about D1.","author":"kentonv","publisher":"Hacker News","date":"2026-06-20","claim_ids":["c1","c2"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"9da82063de66ce1ad721b450dc034701ea493e8ac4829e9201e4db1e969a20cb","hash":"aea5afcc0be9d9a0f2c8c1e706e86866718e3b2507366b83794c7b98584e19c1"},{"id":"p9","type":"hn","url":"https://news.ycombinator.com/item?id=48946048","title":"SQLite Is All You Need","quote":"We serve multi million MAU on sqlite orchestrated through durable objects. It's not the most complex thing in the world but it goes further than CRUD. It costs us such a small amount of money for what it does.","summary":"Runs multi-million monthly-active-user traffic on SQLite inside Durable Objects and says their previous Postgres cluster was orders of magnitude more expensive. Positive, at real scale.","author":"PUSH_AX","publisher":"Hacker News","date":"2026-07-17","claim_ids":["c16"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"aea5afcc0be9d9a0f2c8c1e706e86866718e3b2507366b83794c7b98584e19c1","hash":"e8a0c1b93f522c2fa2b6e7c87cf4ad90a0982eab4755c1853a482bca49962f03"},{"id":"p10","type":"hn","url":"https://news.ycombinator.com/item?id=47787042","title":"Durable Object alarm loop: $34k in 8 days, zero users, no platform warning","quote":"My DO agent's onStart() handler called this.ctx.storage.setAlarm() on every wake-up without checking whether an alarm was already scheduled.","summary":"Pre-launch solo founder posts a full postmortem: setAlarm() called unconditionally on every DO wake-up, multiplied by 60+ preview deployments each spawning independent DO instances, peaked at ~930 billion row reads/day and produced a $34,895 invoice with zero users. No platform warning fired. Negative.","author":"thewillmoss","publisher":"Hacker News","date":"2026-04-16","claim_ids":["c22"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"e8a0c1b93f522c2fa2b6e7c87cf4ad90a0982eab4755c1853a482bca49962f03","hash":"e758a6877951d31a0991b0031c2bdbb6ccb428d5e8520c7991317ebeb1468336"},{"id":"r1","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/cloudflare-os-d1","title":"Fresh first-party indexed versus unindexed lookup receipt","quote":"Primary-key lookup for cloudflare-os-d1 | 1 row | 1 | 0.1485 ms","summary":"Wrangler 4.103.0 read-only production queries compared the primary-key slug lookup with an equality filter on the unindexed title.","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c24"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"e758a6877951d31a0991b0031c2bdbb6ccb428d5e8520c7991317ebeb1468336","hash":"11c8ad10a47f9d251c1341277fe06fe4613af53d5fc447b2e1ed7011fcd05f9f"},{"id":"r2","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/cloudflare-os-d1","title":"Fresh first-party compound SELECT receipt","quote":"Six `UNION ALL` terms | `too many terms in compound SELECT: SQLITE_ERROR [code: 7500]`","summary":"The same production database accepted five UNION ALL terms and rejected six; no rows changed.","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c7"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"11c8ad10a47f9d251c1341277fe06fe4613af53d5fc447b2e1ed7011fcd05f9f","hash":"4112165510fac6f24c4eca7780fc8d3a1f701f8f8544ee290b4e5b29704de643"},{"id":"r3","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/cloudflare-os-d1","title":"Fresh first-party event-ledger size receipt","quote":"401,112 events; database size 1,062,916,096 bytes","summary":"A read-only COUNT on the event database records current rows, rows_read, SQL duration and size_after.","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c19"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"4112165510fac6f24c4eca7780fc8d3a1f701f8f8544ee290b4e5b29704de643","hash":"0387ed14616a6594c2b3fbb26b74d9f3a9460e718021b681b2d8e62456b52b76"},{"id":"r4","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/cloudflare-os-d1","title":"Fresh first-party migration-ledger receipt","quote":"136 applied; latest `0133_charlie_audit.sql`","summary":"A read-only query of d1_migrations confirms the live ledger count and newest recorded migration.","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c18"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"0387ed14616a6594c2b3fbb26b74d9f3a9460e718021b681b2d8e62456b52b76","hash":"ff9fe9433d6fe4d19e724697d88cde081a09f63d1679e78111cfa05602ee7c5c"},{"id":"r5","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/cloudflare-os-d1","title":"First-party 50,000-row index benchmark receipt","quote":"Same query, same answer, 526 times fewer rows read and 23.6 times faster.","summary":"Preview-only scratch-table harness: run the same tenant equality query before and after CREATE INDEX, then drop the table.","publisher":"miscsubjects.com","date":"2026-07-25","claim_ids":["c5","c6"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"ff9fe9433d6fe4d19e724697d88cde081a09f63d1679e78111cfa05602ee7c5c","hash":"cdd467ba01bc307a3dac2db006d06b8137fe4095be80969dbc627fe33c4b4bd2"},{"id":"r6","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/cloudflare-os-d1","title":"First-party D1-to-R2 revision offload receipt","quote":"`meta` fell from 2,068,258 bytes to 206,362 and the row returned HTTP 200.","summary":"Measured repair: full revision snapshots moved to R2 while D1 retained the index and hash chain.","publisher":"miscsubjects.com","date":"2026-07-25","claim_ids":["c9"],"accessed_at":"2026-07-26T05:38:25.854Z","prev":"cdd467ba01bc307a3dac2db006d06b8137fe4095be80969dbc627fe33c4b4bd2","hash":"10a0bdf5ac3f47f7c447e2f7ede897c9fe5387ea22ae069287395cf8fdd9ffa2"}]}