Limits
Feature | Limit |
---|---|
Databases | 50,000 (Workers Paid)1 / 10 (Free) |
Maximum database size | 10 GB (Workers Paid) / 500 MB (Free) |
Maximum storage per account | 250 GB (Workers Paid)1 / 5 GB (Free) |
Time Travel duration (point-in-time recovery) | 30 days (Workers Paid) / 7 days (Free) |
Maximum Time Travel restore operations | 10 restores per 10 minute (per database) |
Queries per Worker invocation (read subrequest limits) | 50 (Bundled) / 1000 (Unbound) |
Maximum number of columns per table | 100 |
Maximum number of rows per table | Unlimited (excluding per-database storage limits) |
Maximum string, BLOB or table row size | 2,000,000 bytes (2 MB) |
Maximum SQL statement length | 100,000 bytes (100 KB) |
Maximum bound parameters per query | 100 |
Maximum arguments per SQL function | 32 |
Maximum characters (bytes) in a LIKE or GLOB pattern | 50 bytes |
Maximum bindings per Workers script | Approximately 5,000 2 |
Maximum SQL query duration | 30 seconds 3 |
Maximum file import (d1 execute ) size | 5 GB 4 |
Cloudflare also offers other storage solutions such as Workers KV, Durable Objects, and R2. Each product has different advantages and limits. Refer to Choose a data or storage product to review which storage option is right for your use case.
Frequently asked questions related to D1 limits:
D1 is designed for horizontal scale out across multiple, smaller (10 GB) databases, such as per-user, per-tenant or per-entity databases. D1 allows you to build applications with thousands of databases at no extra cost for isolating with multiple databases, as the pricing is based only on query and storage costs.
- Each D1 database can store up to 10 GB of data, and you can create up to thousands of separate D1 databases. This allows you to split a single monolithic database into multiple, smaller databases, thereby isolating application data by user, customer, or tenant.
- SQL queries over a smaller working data set can be more efficient and performant while improving data isolation.