Add indexes on notifications table for query performance

Adds two indexes to eliminate full table scans at scale:
- idx_notifications_created_on (created_on DESC) for purge and unfiltered listing
- idx_notifications_is_new_created_on (is_new, created_on DESC) for filtered listing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-28 09:06:19 -04:00
co-authored by Claude Sonnet 4.6
parent c7e1678407
commit 40685837b0
@@ -0,0 +1,2 @@
CREATE INDEX idx_notifications_created_on ON notifications (created_on DESC);
CREATE INDEX idx_notifications_is_new_created_on ON notifications (is_new, created_on DESC);