Commit Graph

1 Commits

Author SHA1 Message Date
Víctor Falcón dae0f64aa1 perf(db): index transactions for the daily synced-email query
SendDailyBankTransactionsSyncedEmailJob filters transactions by
(user_id, source, created_at > ?). The only user_id-leading index is
idx_transactions_budget_lookup (user_id, transaction_date, category_id),
so MySQL narrows to the user's rows then scans them all to filter on
source + created_at — the slow query reported as PHP-LARAVEL-3X. Add a
(user_id, source, created_at) composite index matching the two
equalities and the range.

Fixes PHP-LARAVEL-3X
2026-07-02 15:34:55 +02:00