D1 query duration
Limit · d1
A D1 query has to finish within 30 seconds, because the HTTP API itself must finish in that time.
Free plan
30 seconds, because the HTTP API itself must finish in 30 seconds.
Paid plan
30 seconds.
What it means
A single statement that updates hundreds of thousands of rows can exceed execution limits. The docs say to batch work, for example 1,000 rows at a time.
What it does to a bill
Time spent inside D1 still sits inside the Worker CPU and memory limits.
Sources
- D1 limitsOfficial