Extended SET VAR optimizer hint¶
Percona Server for MySQL extends the SET_VAR introduced in MySQL 8.4
effectively replacing the SET STATEMENT ... FOR statement. SET_VAR is an
optimizer hint that can be applied to session variables.
Percona Server for MySQL 8.4 extends the SET_VAR hint to support the
following:
-
The
OPTIMIZE TABLEstatement -
MyISAM session variables
-
Plugin or Storage Engine variables
-
InnoDB Session variables
-
The
ALTER TABLEstatement -
CALL stored_proc()statement -
The
ANALYZE TABLEstatement -
The
CHECK TABLEstatement -
The
LOAD INDEXstatement (used for MyISAM) -
The
CREATE TABLEstatement
Percona Server for MySQL also supports setting the following variables by using SET_VAR: