[MDEV-31344] I_S optimization: fast status variable lookup Created: 2023-05-25 Updated: 2024-01-23 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Information Schema |
| Fix Version/s: | 11.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Andrew Hutchings |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
INFORMATION_SCHEMA.GLOBAL_VARIABLES, INFORMATION_SCHEMA.SESSION_STATUS and other tables for global/session/system status/variables are often queried for just one variables:
Currently it's a linear search in the array with all variables. Recursive, because some elements of the array may be pointers to sub-arrays or to functions generating sub-arrays. This can be changed to
almost all variables will be in the hash, the array will be very small, less than 10 elements, may be even empty (depends on what plugins are loaded). Thus the new approach can be: if the variable name is fully specified in the query, no wildcards, then do a hash lookup, and if nothing is found check the array of prefixes. |