Database indexes · Content tag
Browse cases and guides discussing database indexes.
6 matching items
Cases · 3
D1 row reads: an author reports a $108 bill in seven days.
@shivek_khurana reports a $108 Cloudflare D1 bill over seven days after a workflow read more rows than needed. The author says adding an index reduced reads by about 90%.
Reported amount · USD
$108
D1: an author reports a $3,500 bill in 48 hours and a full waiver.
@darylginn reports about $3,500 in D1 charges over 48 hours. He says an AI-assisted Postgres migration omitted indexes and caused about 970 billion row reads daily, and that Cloudflare waived the bill.
Reported amount · USD
$3,500
D1 row reads: a $134.14 invoice from unindexed queries.
Justin Ahinon reports that his April 21, 2026 Cloudflare invoice was $134.14, with $127.60 from 127,599,130,859 D1 row reads on a 765,000-row database. He attributes it to full table scans in queries that ran on every page load.
Reported amount · USD
$134.14
Guides · 3
How I keep Cloudflare under $5: where surprise bills come from
Ashish Sharma (@sarmaasis) runs several sites on the $5 Workers Paid plan and lists, product by product, the usage patterns he says quietly run up a Cloudflare bill, ending with a 12-item checklist.
After a $10,000 loop bill: budget alerts and a cost-audit prompt for vibe-coded projects
铁柱AGI (@cgnot996) writes an X article that walks through creating a Cloudflare budget alert, explains why it is only a notice, lists cost-amplifying code patterns, and gives a read-only audit prompt and steps for when a bill has already spiked.
Watch D1’s daily row quotas while testing
Michal Raczka (@michalraczka) warns that D1’s daily row read and write quotas can stop all D1 queries until midnight UTC, notes that indexes trade reads for extra writes, and moves heavy tests to local Miniflare.