D1 query duration

Limit · d1

Reviewed 2026-10-25 · against the official Cloudflare pricing pages listed under Sources

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.

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