Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 43.1Mb
PDF (A4) - 43.2Mb
Man Pages (TGZ) - 295.4Kb
Man Pages (Zip) - 400.6Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  /  ...  /  Performance Schema System Variable Tables

29.12.14 Performance Schema System Variable Tables

The MySQL server maintains many system variables that indicate how it is configured (see Section 7.1.8, “Server System Variables”). System variable information is available in these Performance Schema tables:

The SENSITIVE_VARIABLES_OBSERVER privilege is required to view the values of sensitive system variables in these tables.

The session variable tables (session_variables, variables_by_thread) contain information only for active sessions, not terminated sessions.

The global_variables and session_variables tables have these columns:

  • VARIABLE_NAME

    The system variable name.

  • VARIABLE_VALUE

    The system variable value. For global_variables, this column contains the global value. For session_variables, this column contains the variable value in effect for the current session.

The global_variables and session_variables tables have these indexes:

  • Primary key on (VARIABLE_NAME)

The variables_by_thread table has these columns:

  • THREAD_ID

    The thread identifier of the session in which the system variable is defined.

  • VARIABLE_NAME

    The system variable name.

  • VARIABLE_VALUE

    The session variable value for the session named by the THREAD_ID column.

The variables_by_thread table has these indexes:

  • Primary key on (THREAD_ID, VARIABLE_NAME)

The variables_by_thread table contains system variable information only about foreground threads. If not all threads are instrumented by the Performance Schema, this table misses some rows. In this case, the Performance_schema_thread_instances_lost status variable is greater than zero.

TRUNCATE TABLE is not supported for Performance Schema system variable tables.