This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
app/apps/api
Flea Flicker 04147f3e6c fix(reminders): replace N+1 per-appointment queries with single JOIN query
Replace the per-appointment sequential queries (client, pet, service,
staff) in runReminderCheck with a single JOIN query that fetches all
appointment data in one round-trip. Group results in memory using a Map
for O(1) lookups.

Before: 1 initial query + N*(1 existing + 4 related) = 1 + 5N queries
After:  1 initial + 1 sent-check + 1 JOIN = 3 queries total

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-14 14:41:26 +00:00
..