I’m working on a query to count the number of bugs created on 2019-03-01 or later from a bugs
table with the following schema:
bugs(id, token, title, category, device, reported_at, created_at, updated_at)
Here is the query I’m currently using:
SELECT COUNT(*)
FROM bugs
WHERE created_at >= '2019-03-01';
However, this query is running very slowly, and I am hitting time limits. I should mention that I can’t add any new indexes to this table. There is an existing index named index_bugs_on_category_and_token_and_reported_at
.
I would greatly appreciate any suggestions on how to optimize this query or any alternative approaches to speed it up given the existing constraints.