No, unless you are willing to go via the HTTP API, which is *painfully* slow
No, unless you are willing to go via the HTTP API, which is painfully slow
2/17/24, 7:42 PM
p.posted and p.retry but it's still scanning the whole table p. Is there anyway to reduce scanned rows of the query above? I'm running this query every minutes so everyday I'm wasting 10-20k scanned row. This table is going to grow much larger so the waste will be more significant
posted and retry, or two individual indexes?posted and retry if I place the condition in the correct order right?p.postedp.retrySELECT *
FROM categories
JOIN images_categories ON categories.id = images_categories.category_id
JOIN images ON images_categories.image_id = images.id;Error: D1_ERROR: A prepared SQL statement must contain only one statement. let result = await platform!.env.DB.prepare(
`SELECT *
FROM categories
JOIN images_categories ON categories.id = images_categories.category_id
JOIN images ON images_categories.image_id = images.id;
`
).all();`SELECT * FROM categories JOIN images_categories ON categories.id = images_categories.category_id JOIN images ON images_categories.image_id = images.id;`postedpostedretryretryCREATE INDEX post_posted_retry_idx ON post (posted, retry);