# Performance Schema events\_statements\_summary\_by\_program Table

**MariaDB starting with** [**10.5.2**](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/mariadb-1052-release-notes)

The `events_statements_summary_by_program` table, along with many other new [Performance Schema tables](list-of-performance-schema-tables), was added in [MariaDB 10.5.2](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/mariadb-1052-release-notes).

Each row in the [Performance Schema](..) events\_statements\_summary\_by\_program table summarizes events for a particular stored program (stored procedure, stored function, trigger or event).

It contains the following fields.

| Column                          | Type                                                       | Null | Description                                                                                                                                                                                                                  |
| ------------------------------- | ---------------------------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OBJECT\_TYPE                    | enum('EVENT', 'FUNCTION', 'PROCEDURE', 'TABLE', 'TRIGGER') | YES  | Object type for which the summary is generated.                                                                                                                                                                              |
| OBJECT\_SCHEMA                  | varchar(64)                                                | NO   | The schema of the object for which the summary is generated.                                                                                                                                                                 |
| OBJECT\_NAME                    | varchar(64)                                                | NO   | The name of the object for which the summary is generated.                                                                                                                                                                   |
| COUNT\_STAR                     | bigint(20) unsigned                                        | NO   | The number of summarized events (from events\_statements\_current). This value includes all events, whether timed or nontimed.                                                                                               |
| SUM\_TIMER\_WAIT                | bigint(20) unsigned                                        | NO   | The number of summarized events (from events\_statements\_current). This value includes all events, whether timed or nontimed.                                                                                               |
| MIN\_TIMER\_WAIT                | bigint(20) unsigned                                        | NO   | The minimum wait time of the summarized timed events.                                                                                                                                                                        |
| AVG\_TIMER\_WAIT                | bigint(20) unsigned                                        | NO   | The average wait time of the summarized timed events.                                                                                                                                                                        |
| MAX\_TIMER\_WAIT                | bigint(20) unsigned                                        | NO   | The maximum wait time of the summarized timed events.                                                                                                                                                                        |
| COUNT\_STATEMENTS               | bigint(20) unsigned                                        | NO   | Total number of nested statements invoked during stored program execution.                                                                                                                                                   |
| SUM\_STATEMENTS\_WAIT           | bigint(20) unsigned                                        | NO   | The total wait time of the summarized timed statements. This value is calculated only for timed statements because nontimed statements have a wait time of NULL. The same is true for the other xxx\_STATEMENT\_WAIT values. |
| MIN\_STATEMENTS\_WAIT           | bigint(20) unsigned                                        | NO   | The minimum wait time of the summarized timed statements.                                                                                                                                                                    |
| AVG\_STATEMENTS\_WAIT           | bigint(20) unsigned                                        | NO   | The average wait time of the summarized timed statements.                                                                                                                                                                    |
| MAX\_STATEMENTS\_WAIT           | bigint(20) unsigned                                        | NO   | The maximum wait time of the summarized timed statements.                                                                                                                                                                    |
| SUM\_LOCK\_TIME                 | bigint(20) unsigned                                        | NO   | The total time spent (in picoseconds) waiting for table locks for the summarized statements.                                                                                                                                 |
| SUM\_ERRORS                     | bigint(20) unsigned                                        | NO   | The total number of errors that occurend for the summarized statements.                                                                                                                                                      |
| SUM\_WARNINGS                   | bigint(20) unsigned                                        | NO   | The total number of warnings that occurend for the summarized statements.                                                                                                                                                    |
| SUM\_ROWS\_AFFECTED             | bigint(20) unsigned                                        | NO   | The total number of affected rows by the summarized statements.                                                                                                                                                              |
| SUM\_ROWS\_SENT                 | bigint(20) unsigned                                        | NO   | The total number of rows returned by the summarized statements.                                                                                                                                                              |
| SUM\_ROWS\_EXAMINED             | bigint(20) unsigned                                        | NO   | The total number of rows examined by the summarized statements.The total number of affected rows by the summarized statements.                                                                                               |
| SUM\_CREATED\_TMP\_DISK\_TABLES | bigint(20) unsigned                                        | NO   | The total number of on-disk temporary tables created by the summarized statements.                                                                                                                                           |
| SUM\_CREATED\_TMP\_TABLES       | bigint(20) unsigned                                        | NO   | The total number of in-memory temporary tables created by the summarized statements.                                                                                                                                         |
| SUM\_SELECT\_FULL\_JOIN         | bigint(20) unsigned                                        | NO   | The total number of full joins executed by the summarized statements.                                                                                                                                                        |
| SUM\_SELECT\_FULL\_RANGE\_JOIN  | bigint(20) unsigned                                        | NO   | The total number of range search joins executed by the summarized statements.                                                                                                                                                |
| SUM\_SELECT\_RANGE              | bigint(20) unsigned                                        | NO   | The total number of joins that used ranges on the first table executed by the summarized statements.                                                                                                                         |
| SUM\_SELECT\_RANGE\_CHECK       | bigint(20) unsigned                                        | NO   | The total number of joins that check for key usage after each row executed by the summarized statements.                                                                                                                     |
| SUM\_SELECT\_SCAN               | bigint(20) unsigned                                        | NO   | The total number of joins that did a full scan of the first table executed by the summarized statements.                                                                                                                     |
| SUM\_SORT\_MERGE\_PASSES        | bigint(20) unsigned                                        | NO   | The total number of merge passes that the sort algorithm has had to do for the summarized statements.                                                                                                                        |
| SUM\_SORT\_RANGE                | bigint(20) unsigned                                        | NO   | The total number of sorts that were done using ranges for the summarized statements.                                                                                                                                         |
| SUM\_SORT\_ROWS                 | bigint(20) unsigned                                        | NO   | The total number of sorted rows that were sorted by the summarized statements.                                                                                                                                               |
| SUM\_SORT\_SCAN                 | bigint(20) unsigned                                        | NO   | The total number of sorts that were done by scanning the table by the summarized statements.                                                                                                                                 |
| SUM\_NO\_INDEX\_USED            | bigint(20) unsigned                                        | NO   | The total number of statements that performed a table scan without using an index.                                                                                                                                           |
| SUM\_NO\_GOOD\_INDEX\_USED      | bigint(20) unsigned                                        | NO   | The total number of statements where no good index was found.                                                                                                                                                                |

<sub>_This page is licensed: CC BY-SA / Gnu FDL_</sub>

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