### 27.12.10 Performance Schema User-Defined Variable Tables

[]()[]()

 The Performance Schema provides a [`user_variables_by_thread`](performance-schema-user-variable-tables.html) table that exposes user-defined variables. These are variables defined within a specific session and include a `@` character preceding the name; see [Section 9.4, “User-Defined Variables”](user-variables.html).

 The [`user_variables_by_thread`](performance-schema-user-variable-tables.html) table has these columns:

* `THREAD_ID`

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

* `VARIABLE_NAME`

   The variable name, without the leading `@` character.

* `VARIABLE_VALUE`

   The variable value.

 The [`user_variables_by_thread`](performance-schema-user-variable-tables.html) table has these indexes:

* Primary key on (`THREAD_ID`, `VARIABLE_NAME`)

[`TRUNCATE TABLE`](truncate-table.html) is not permitted for the [`user_variables_by_thread`](performance-schema-user-variable-tables.html) table.

