fix: batch-fetch PitchingCardRatings instead of per-row queries (#19) #44

Merged
cal merged 1 commits from ai/paper-dynasty-database#19 into next-release 2026-03-05 03:19:59 +00:00

1 Commits

Author SHA1 Message Date
Cal Corum
ae8c20ea1c fix: batch-fetch PitchingCardRatings instead of per-row queries (#19)
Replace two get_or_none calls per row in sort_pitchers and sort_starters
with a single batched SELECT for all card IDs, reducing N*2 queries to 1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 03:19:43 +00:00