Ah you mentioned that there were ways I thought lmao
Ah you mentioned that there were ways I thought lmao
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
SELECT *
FROM categories
JOIN images_categories ON categories.id = images_categories.category_id
JOIN images ON images_categories.image_id = images.id; 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();