billflare.

A polling table scan can read billions of D1 rows with no users

Jad (@JadMadi), replying to a $500 D1 bill thread, says D1 bills per row read rather than per query, so an unindexed scan on a polling interval can read billions of rows; he advises checking indexes and query plans.

Products
D1Workers
Source
Author experience𝕏
Author
Jad (@JadMadi)

Key points

  • The author states he does not work for or is not affiliated with Cloudflare, and says a $500 bill on a private app is almost certainly an unindexed query rather than a pricing scam.
  • He explains that D1 bills per row read, not per query: a Worker running a table scan without an index on a polling interval can read billions of rows with zero active users. He reports running 1M monthly visitors and 5B reads on D1 for $5 a month.
  • His advice is to check indexes and query plans. He also says the missing spend limit is the platform's one major issue.
  • Official D1 pricing (rechecked 2026-10-20): rows read count rows scanned, so a query filtering on an unindexed column still reads the rows it must scan; Workers Paid includes 25 billion rows read per month, then $0.001 per million rows.

Original sources

  1. Published

    Original post

    Read on 𝕏

    Jad (@JadMadi), replying to a $500 D1 bill thread, says D1 bills per row read rather than per query, so an unindexed scan on a polling interval can read billions of rows; he advises checking indexes and query plans.

    Jad 贾德

    @JadMadi · Original 𝕏 post

    I do not work for Cloudflare and not affiliated with them, but a $500 bill on a private app is almost certainly an unindexed query, not a pricing scam. D1 bills per row read, not per query. If a worker runs a table scan without an index on a polling interval, you can easily read billions of rows with zero active users. I run 1M monthly visitors and 5B reads on D1 for $5 a month. Check your indexes and query plans. Happy to take a look if you want to share the schema. Cloudflare is so far the optimal dev platform, with one major issue: the spend limit. This single feature could have saved several developers from agonies and sad stories.
Community resourceWorkers +3

Cloudflare Spend Guard: an account-wide usage circuit breaker via shared KV

A Worker that reads account-wide usage every minute, trips when any monitored metric reaches 95% of a configured allowance, and publishes the state to shared KV for opted-in projects to refuse billable work. The README stresses it is not a hard cap.

Durable Objects

Revulate: a usual $5–10 bill became $2,580.48 from Durable Objects; $2,080.48 offered as service credit.

Revulate (@Revulate) says their usual $5–10 bill became $2,580.48 from accidental Durable Objects usage. Support approved $2,080.48 in future service credit under case 02382870, but the author says they need a refund to the original PayPal payment and asks Cloudflare staff for help. The author later says a follow-up case #02390382 was closed by the same agent, and that another reviewer and Finance declined the PayPal refund.

Author experienceWorkers +7

Lanshu: an AI-assisted Cloudflare billing risk checklist

Lanshu (@LufzzLiz) shares a six-step prompt for checking account ownership, usage, runaway consumption and budget alerts. Replies add alarm logging, email delivery checks and separate notifications.