sendou.ink/app/features/mmr/queries
Kalle f21f2f7d76 Rewrite orderedUserMMRBySeason as window function to avoid 12s plan
The max(id) self-join let the query planner pick a nested-loop plan when
it misjudged a season's row count (e.g. a freshly started season whose
stats are dwarfed by older seasons), making the query take ~12s on the
current season. The window-function form references Skill once and is
plan-stable regardless of stats. Output is identical.
2026-06-08 17:25:01 +03:00
..
findCurrentSkillByUserId.server.ts Unify db type files 2025-03-21 21:47:08 +02:00
findCurrentTeamSkillByIdentifier.server.ts Unify db type files 2025-03-21 21:47:08 +02:00
findSeedingSkill.server.ts Remove dead code, migrate one Skill function to Kysely (#2785) 2026-02-15 21:23:13 +02:00
orderedMMRBySeason.server.ts Rewrite orderedUserMMRBySeason as window function to avoid 12s plan 2026-06-08 17:25:01 +03:00