mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
e9d5cc9f8d
The character selection query used `WHERE identifier LIKE 'char%:<license>'`. Every multicharacter identifier starts with `char`, so the primary key range covers the whole table and it degrades to a full scan on every join. Build the exact identifiers (`char1:<license>` .. `charN:<license>` for the player's slots) and query with `IN`, which hits the primary key directly. Measured on a 50k row users table (MariaDB 12.3.2): rows examined 45648 -> 3, query time 52.7 ms -> 3.2 ms. In-game the selection screen shows the same characters in the same slots.