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.
Closes#3046
Main point is to fix the league (long running) skill timing
but this also should improve it for tournaments
because sometimes there is a gap between finalized at and started at.
* Initial
* Progress
* Recent winners
* Add button
* Progress
* Mobile nav initial
* UI tweaks
* Overflow
* AnythingAdder links to places
* Remove color for tournament showcase
* Adjust SQ top banner based on if season is on right or not
* Tournament participant count fixed
* Log out
* todo
* Progress
* Nav complete
* Done?
* Fix lint
* Translate settings
* Initial
* Faster user page
* Remove redundant function
* Favorite badge sorting
* Upgrade deps
* Simplify entry.server
* Bun tests initial
* Update package.json npm -> bun
* Update README
* Type safe translations again
* Don't load streams info for finalized tournaments
* Translations as an object
* More unit test work
* Convert match.server.test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* test
* Test & all done
* Working cf
* Bun GA try
* No cache
* spacing
* spacing 2
* Add SQL logging
* Remove NR
* Hmm
* Hmm 2
* Interesting
* SKALOP_SYSTEM_MESSAGE_URL
* .
* .
* ?
* .
* ?
* Server.ts adjust
* Downgrade Tldraw
* E2E test fix
* Fix lint
* Initial
* Can post new
* Load team
* seed + loader posts
* LFGPost render initial
* More UI work
* Tiers
* sticky left
* Mobile
* new.tsx work
* TeamLFGPost component initial
* Full team member list
* Add TODO
* Delete post action
* Edit post etc.
* Delete team posts when team disbands
* Prevent adding same post type twice in UI
* Post expiry logic
* Fix layout shift
* Filters initial
* Progress
* Weapon filtered implemented
* Weapon alt kits in filtering
* + visibility
* i18n
* E2E test
* Team = null
* Initial
* Saves preferences
* Include TW
* mapModePreferencesToModeList
* mapPoolFromPreferences initial
* Preference to map pool
* Adjust seed
* q.looking tests
* adds about created map preferences to memento in the correct spot (two preferrers)
* Failing test about modes
* Mode preferences to memento
* Remove old Plus Voting code
* Fix seeding
* find match by id via kysely
* View map memento
* Fix up map list generation logic
* Mode memento info
* Future match modes
* Add TODO
* Migration number
* Migrate test DB
* Remove old map pool code
* createGroupFromPrevious new
* Settings styling
* VC to settings
* Weapon pool
* Add TODOs
* Progress
* Adjust mode exclusion policy
* Progress
* Progress
* Progress
* Notes in progress
* Note feedback after submit
* Textarea styling
* Unskip tests
* Note sorting failing test
* Private note in Q
* Ownerpicksmaps later
* New bottom section
* Mobile layout initial
* Add basic match meta
* Tabs initial
* Sticky tab
* Unseen messages in match page
* Front page i18n
* Settings i18n
* Looking 18n
* Chat i18n
* Progress
* Tranfer weapon pools script
* Sticky on match page
* Match page translations
* i18n - tiers page
* Preparing page i18n
* Icon
* Show add note right after report
* Update PlusVotingResult
* Logic
* Replace plus tiers
* Testing initial
* Test progress
* Working one test
* Tests
* Schema different file
* Dynamic test
* Fix test util
* Initial
* New group cards initial
* Remove unused prop
* Vc
* Styling for after the match is locked
* Team
* Impersonate always in dev
* Diff
* Fix crash if match has no memento when inserting skill