Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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:
select variable_value from information_schema.global_status where variable_value='uptime' |
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
- a hash with all variables that aren't dynamically generated by a function call
- an array with all prefixes that need a function call to generate full variable names.
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.
Attachments
Issue Links
- relates to
-
MDEV-31342 I_S optimization: avoid temp table
- Open