# Information Schema PROFILING Table

The [Information Schema](https://mariadb.com/docs/server/reference/system-tables/information-schema) `PROFILING` table contains information about statement resource usage. Profiling information is only recorded if the [profiling](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#profiling) session variable is set to `1`.

It contains the following columns:

| Column Name          | Description                                                                 |
| -------------------- | --------------------------------------------------------------------------- |
| QUERY\_ID            | Query\_ID.                                                                  |
| SEQ                  | Sequence number showing the display order for rows with the same QUERY\_ID. |
| STATE                | Profiling state.                                                            |
| DURATION             | Time in seconds that the statement has been in the current state.           |
| CPU\_USER            | User CPU usage in seconds.                                                  |
| CPU\_SYSTEM          | System CPU usage in seconds.                                                |
| CONTEXT\_VOLUNTARY   | Number of voluntary context switches.                                       |
| CONTEXT\_INVOLUNTARY | Number of involuntary context switches.                                     |
| BLOCK\_OPS\_IN       | Number of block input operations.                                           |
| BLOCK\_OPS\_OUT      | Number of block output operations.                                          |
| MESSAGES\_SENT       | Number of communications sent.                                              |
| MESSAGES\_RECEIVED   | Number of communications received.                                          |
| PAGE\_FAULTS\_MAJOR  | Number of major page faults.                                                |
| PAGE\_FAULTS\_MINOR  | Number of minor page faults.                                                |
| SWAPS                | Number of swaps.                                                            |
| SOURCE\_FUNCTION     | Function in the source code executed by the profiled state.                 |
| SOURCE\_FILE         | File in the source code executed by the profiled state.                     |
| SOURCE\_LINE         | Line in the source code executed by the profiled state.                     |

It contains similar information to the [SHOW PROFILE](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-profile) and [SHOW PROFILES](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-profiles) statements.

Profiling is enabled per session. When a session ends, its profiling information is lost.

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

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