9 ms·
Wouldn't querying the count be slow using a WHERE clause?
Wouldn't querying the count be slow using a WHERE clause?
it was indexed which should help, but i assume that the reads are far less common than the inserts. reads could even be scheduled/automated and stored in a cache table if they need to be faster and ok being a little stale
There's only dozens (or at most ~100) rows.