-- Run on live DB (phpMyAdmin or mysql CLI) to speed up notification list queries.
-- Safe to re-run: skip any line that errors with "Duplicate key name".

ALTER TABLE `notifications` ADD INDEX `idx_notifications_created_at` (`created_at`);
ALTER TABLE `notifications` ADD INDEX `idx_notifications_status_created_at` (`status`, `created_at`);
ALTER TABLE `user_notifications` ADD INDEX `idx_user_notifications_user_sent_at` (`user_id`, `sent_at`);
