What is your query A SELECT isn’t

What is your query? A SELECT isn’t guaranteed to be not write rows.
5 Replies
TigersWay
TigersWay11mo ago
You are totally right, but in those cases it's a simple SELECT I'm updating my API to pass simple SQL and check these, right now. I want to understand 😅 First logical find, a JOIN will multiply the number of rows_read But a sum(count(*)) OVER() will start to use rows_written And a "virtual" table (WITH RECURSIVE days(day) AS (VALUES('2023-08-01') UNION ALL SELECT date(day, '+1 day') FROM days WHERE day<'2023-08-31') SELECT days.day FROM days) will also generate rows_written
elithrar
elithrar11mo ago
That I would expect as you’re creating a temporary table.
TigersWay
TigersWay11mo ago
Well, my main requests, despite some good indexes just became "monsters" 🥲 I'll need to work on that while you're still "beta"!!
elithrar
elithrar11mo ago
I mean we include 50M writes and 25 billion reads per month. Are you sure it’s worth optimizing? https://developers.cloudflare.com/d1/platform/pricing/
Pricing · Cloudflare D1 docs
While in public Alpha, D1 is currently free to use on all Workers plans. Refer to the our recent announcement ) for more information.
TigersWay
TigersWay11mo ago
It is/was fun to try to fit in the free plan. For the sport!