# Sys Schema sys\_config Table

{% hint style="info" %}
Sys Schema is available from MariaDB 10.6.
{% endhint %}

The *sys.sys\_config* table holds configuration options for the [Sys Schema](/docs/server/reference/system-tables/sys-schema.md).

This is a persistent table (using the [Aria](/docs/server/server-usage/storage-engines/aria.md) storage engine), with the configuration persisting across upgrades (new options are added with [INSERT IGNORE](/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data/insert-ignore.md).

The table also has two related triggers, which maintain the user that INSERTs or UPDATEs the configuration - sys\_config\_insert\_set\_user and sys\_config\_update\_set\_user respectively.

Its structure is as follows:

```sql
+----------+--------------+------+-----+-------------------+-----------------------------+
| Field    | Type         | Null | Key | Default           | Extra                       |
+----------+--------------+------+-----+-------------------+-----------------------------+
| variable | varchar(128) | NO   | PRI | NULL              |                             |
| value    | varchar(128) | YES  |     | NULL              |                             |
| set_time | timestamp    | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| set_by   | varchar(128) | YES  |     | NULL              |                             |
+----------+--------------+------+-----+-------------------+-----------------------------+
```

{% hint style="warning" %}
Note, when functions check for configuration options, they first check whether a similar named user variable exists with a value, and if this is not set then pull the configuration option from this table in to that named user variable. This is done for performance reasons (to not continually `SELECT` from the table), however this comes with the side effect that once inited, the values last with the session, somewhat like how session variables are inited from global variables. If the values within this table are changed, they will not take effect until the user logs in again.
{% endhint %}

### Options Included

| Variable                               | Default Value | Description                                                                                                                                                                                                          |
| -------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| statement\_truncate\_len               | 64            | Sets the size to truncate statements to, for the [format\_statement](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/format_statement.md) function.                                      |
| statement\_performance\_analyzer.limit | 100           | The maximum number of rows to include for the views that does not have a built-in limit (e.g. the 95th percentile view). If not set the limit is 100.                                                                |
| statement\_performance\_analyzer.view  | NULL          | Used together with the 'custom' view. If the value contains a space, it is considered a query, otherwise it must be an existing view querying the performance\_schema.events\_statements\_summary\_by\_digest table. |
| diagnostics.allow\_i\_s\_tables        | OFF           | Specifies whether it is allowed to do table scan queries on information\_schema.TABLES for the diagnostics procedure.                                                                                                |
| diagnostics.include\_raw               | OFF           | Set to 'ON' to include the raw data (e.g. the original output of "SELECT \* FROM sys.metrics") for the diagnostics procedure.                                                                                        |
| ps\_thread\_trx\_info.max\_length      | 65535         | Sets the maximum output length for JSON object output by the ps\_thread\_trx\_info() function.                                                                                                                       |

### Notes

Some early versions of *sys\_config* were stored in [InnoDB](/docs/server/server-usage/storage-engines/innodb.md) format.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/system-tables/sys-schema/sys-schema-sys_config-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
