# metrics Sys Schema View

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

## Description

The `metrics` view contains global status variables (as found in the [Performance Schema global\_status Table](/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-global_status-table.md)), [InnoDB](/docs/server/server-usage/storage-engines/innodb.md) metrics (as found in the [Information Schema INNODB\_METRICS Table](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-innodb-tables/information-schema-innodb_metrics-table.md), current and total memory allocation, based on the Performance Schema memory instrumentation, as well the current time in human readable and Unix timestamp formats.

It contains the following columns:

| Column          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Variable\_name  | The name of the metric. One of the [VARIABLE\_NAME column](/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-global_status-table.md) if a global\_status table, the [NAME column](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-innodb-tables/information-schema-innodb_metrics-table.md) if an InnoDB metric, or a description for other metrics.                                                                                                                                                                                                                                                                                                                                                                                                               |
| Variable\_value | The metric value. One of the [VARIABLE\_VALUE column](/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-global_status-table.md) if a global status variable, the [COUNT column](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-innodb-tables/information-schema-innodb_metrics-table.md) for InnoDB metrics, the related column from the [Performance Schema memory\_summary\_global\_by\_event\_name table](/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-memory_summary_global_by_event_name-table.md), the value of [NOW(3)](/docs/server/reference/sql-functions/date-time-functions/now.md) or [UNIX\_TIMESTAMP(NOW(3))](/docs/server/reference/sql-functions/date-time-functions/unix_timestamp.md). |
| Type            | Metric type. One of Global Status, InnoDB Metrics - % (with % being the value of the [SUBSYSTEM column](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-innodb-tables/information-schema-innodb_metrics-table.md) in the INNODB\_METRICS table, Performance Schema or System Time                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Enabled         | Whether the metric is enabled. Always YES for global status variables and the current time. For InnoDB metrics, YES only if the [STATUS column of the INNODB\_METRICS table](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-innodb-tables/information-schema-innodb_metrics-table.md), otherwise NO. For memory metrics: YES, NO or PARTIAL (for metrics where not all memory/% instruments are enabled). Performance Schema memory instruments are always enabled)                                                                                                                                                                                                                                                                                                                                                  |

## Example

```sql
SELECT * FROM sys.metrics\G
*************************** 1. row ***************************
 Variable_name: aborted_clients
Variable_value: 0
          Type: Global Status
       Enabled: YES
*************************** 2. row ***************************
 Variable_name: aborted_connects
Variable_value: 0
          Type: Global Status
       Enabled: YES

...

*************************** 578. row ***************************
 Variable_name: trx_undo_slots_used
Variable_value: 0
          Type: InnoDB Metrics - transaction
       Enabled: YES
*************************** 579. row ***************************
 Variable_name: NOW()
Variable_value: 2024-09-09 16:16:08.745
          Type: System Time
       Enabled: YES
*************************** 580. row ***************************
 Variable_name: UNIX_TIMESTAMP()
Variable_value: 1725891368.745
          Type: System Time
       Enabled: YES
```

<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-views/metrics-sys-schema-view.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.
