Documentation Home
MySQL 9.3 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.8Mb
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 261.1Kb
Man Pages (Zip) - 368.3Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


29.12.20.8 Table I/O and Lock Wait Summary Tables

The following sections describe the table I/O and lock wait summary tables:

29.12.20.8.1 The table_io_waits_summary_by_table Table

Thetable_io_waits_summary_by_table table aggregates all table I/O wait events, as generated by thewait/io/table/sql/handler instrument. The grouping is by table.

Thetable_io_waits_summary_by_table table has these grouping columns to indicate how the table aggregates events:OBJECT_TYPE,OBJECT_SCHEMA, andOBJECT_NAME. These columns have the same meaning as in theevents_waits_current table. They identify the table to which the row applies.

table_io_waits_summary_by_table has the following summary columns containing aggregated values. As indicated in the column descriptions, some columns are more general and have values that are the same as the sum of the values of more fine-grained columns. For example, columns that aggregate all writes hold the sum of the corresponding columns that aggregate inserts, updates, and deletes. In this way, aggregations at higher levels are available directly without the need for user-defined views that sum lower-level columns.

  • COUNT_STAR,SUM_TIMER_WAIT,MIN_TIMER_WAIT,AVG_TIMER_WAIT,MAX_TIMER_WAIT

    These columns aggregate all I/O operations. They are the same as the sum of the correspondingxxx_READ andxxx_WRITE columns.

  • COUNT_READ,SUM_TIMER_READ,MIN_TIMER_READ,AVG_TIMER_READ,MAX_TIMER_READ

    These columns aggregate all read operations. They are the same as the sum of the correspondingxxx_FETCH columns.

  • COUNT_WRITE,SUM_TIMER_WRITE,MIN_TIMER_WRITE,AVG_TIMER_WRITE,MAX_TIMER_WRITE

    These columns aggregate all write operations. They are the same as the sum of the correspondingxxx_INSERT,xxx_UPDATE, andxxx_DELETE columns.

  • COUNT_FETCH,SUM_TIMER_FETCH,MIN_TIMER_FETCH,AVG_TIMER_FETCH,MAX_TIMER_FETCH

    These columns aggregate all fetch operations.

  • COUNT_INSERT,SUM_TIMER_INSERT,MIN_TIMER_INSERT,AVG_TIMER_INSERT,MAX_TIMER_INSERT

    These columns aggregate all insert operations.

  • COUNT_UPDATE,SUM_TIMER_UPDATE,MIN_TIMER_UPDATE,AVG_TIMER_UPDATE,MAX_TIMER_UPDATE

    These columns aggregate all update operations.

  • COUNT_DELETE,SUM_TIMER_DELETE,MIN_TIMER_DELETE,AVG_TIMER_DELETE,MAX_TIMER_DELETE

    These columns aggregate all delete operations.

Thetable_io_waits_summary_by_table table has these indexes:

  • Unique index on (OBJECT_TYPE,OBJECT_SCHEMA,OBJECT_NAME)

TRUNCATE TABLE is permitted for table I/O summary tables. It resets the summary columns to zero rather than removing rows. Truncating this table also truncates thetable_io_waits_summary_by_index_usage table.

29.12.20.8.2 The table_io_waits_summary_by_index_usage Table

Thetable_io_waits_summary_by_index_usage table aggregates all table index I/O wait events, as generated by thewait/io/table/sql/handler instrument. The grouping is by table index.

The columns oftable_io_waits_summary_by_index_usage are nearly identical totable_io_waits_summary_by_table. The only difference is the additional group column,INDEX_NAME, which corresponds to the name of the index that was used when the table I/O wait event was recorded:

  • A value ofPRIMARY indicates that table I/O used the primary index.

  • A value ofNULL means that table I/O used no index.

  • Inserts are counted againstINDEX_NAME = NULL.

Thetable_io_waits_summary_by_index_usage table has these indexes:

  • Unique index on (OBJECT_TYPE,OBJECT_SCHEMA,OBJECT_NAME,INDEX_NAME)

TRUNCATE TABLE is permitted for table I/O summary tables. It resets the summary columns to zero rather than removing rows. This table is also truncated by truncation of thetable_io_waits_summary_by_table table. A DDL operation that changes the index structure of a table may cause the per-index statistics to be reset.

29.12.20.8.3 The table_lock_waits_summary_by_table Table

Thetable_lock_waits_summary_by_table table aggregates all table lock wait events, as generated by thewait/lock/table/sql/handler instrument. The grouping is by table.

This table contains information about internal and external locks:

  • An internal lock corresponds to a lock in the SQL layer. This is currently implemented by a call tothr_lock(). In event rows, these locks are distinguished by theOPERATION column, which has one of these values:

    read normalread with shared locksread high priorityread no insertwrite allow writewrite concurrent insertwrite delayedwrite low prioritywrite normal
  • An external lock corresponds to a lock in the storage engine layer. This is currently implemented by a call tohandler::external_lock(). In event rows, these locks are distinguished by theOPERATION column, which has one of these values:

    read externalwrite external

Thetable_lock_waits_summary_by_table table has these grouping columns to indicate how the table aggregates events:OBJECT_TYPE,OBJECT_SCHEMA, andOBJECT_NAME. These columns have the same meaning as in theevents_waits_current table. They identify the table to which the row applies.

table_lock_waits_summary_by_table has the following summary columns containing aggregated values. As indicated in the column descriptions, some columns are more general and have values that are the same as the sum of the values of more fine-grained columns. For example, columns that aggregate all locks hold the sum of the corresponding columns that aggregate read and write locks. In this way, aggregations at higher levels are available directly without the need for user-defined views that sum lower-level columns.

  • COUNT_STAR,SUM_TIMER_WAIT,MIN_TIMER_WAIT,AVG_TIMER_WAIT,MAX_TIMER_WAIT

    These columns aggregate all lock operations. They are the same as the sum of the correspondingxxx_READ andxxx_WRITE columns.

  • COUNT_READ,SUM_TIMER_READ,MIN_TIMER_READ,AVG_TIMER_READ,MAX_TIMER_READ

    These columns aggregate all read-lock operations. They are the same as the sum of the correspondingxxx_READ_NORMAL,xxx_READ_WITH_SHARED_LOCKS,xxx_READ_HIGH_PRIORITY, andxxx_READ_NO_INSERT columns.

  • COUNT_WRITE,SUM_TIMER_WRITE,MIN_TIMER_WRITE,AVG_TIMER_WRITE,MAX_TIMER_WRITE

    These columns aggregate all write-lock operations. They are the same as the sum of the correspondingxxx_WRITE_ALLOW_WRITE,xxx_WRITE_CONCURRENT_INSERT,xxx_WRITE_LOW_PRIORITY, andxxx_WRITE_NORMAL columns.

  • COUNT_READ_NORMAL,SUM_TIMER_READ_NORMAL,MIN_TIMER_READ_NORMAL,AVG_TIMER_READ_NORMAL,MAX_TIMER_READ_NORMAL

    These columns aggregate internal read locks.

  • COUNT_READ_WITH_SHARED_LOCKS,SUM_TIMER_READ_WITH_SHARED_LOCKS,MIN_TIMER_READ_WITH_SHARED_LOCKS,AVG_TIMER_READ_WITH_SHARED_LOCKS,MAX_TIMER_READ_WITH_SHARED_LOCKS

    These columns aggregate internal read locks.

  • COUNT_READ_HIGH_PRIORITY,SUM_TIMER_READ_HIGH_PRIORITY,MIN_TIMER_READ_HIGH_PRIORITY,AVG_TIMER_READ_HIGH_PRIORITY,MAX_TIMER_READ_HIGH_PRIORITY

    These columns aggregate internal read locks.

  • COUNT_READ_NO_INSERT,SUM_TIMER_READ_NO_INSERT,MIN_TIMER_READ_NO_INSERT,AVG_TIMER_READ_NO_INSERT,MAX_TIMER_READ_NO_INSERT

    These columns aggregate internal read locks.

  • COUNT_READ_EXTERNAL,SUM_TIMER_READ_EXTERNAL,MIN_TIMER_READ_EXTERNAL,AVG_TIMER_READ_EXTERNAL,MAX_TIMER_READ_EXTERNAL

    These columns aggregate external read locks.

  • COUNT_WRITE_ALLOW_WRITE,SUM_TIMER_WRITE_ALLOW_WRITE,MIN_TIMER_WRITE_ALLOW_WRITE,AVG_TIMER_WRITE_ALLOW_WRITE,MAX_TIMER_WRITE_ALLOW_WRITE

    These columns aggregate internal write locks.

  • COUNT_WRITE_CONCURRENT_INSERT,SUM_TIMER_WRITE_CONCURRENT_INSERT,MIN_TIMER_WRITE_CONCURRENT_INSERT,AVG_TIMER_WRITE_CONCURRENT_INSERT,MAX_TIMER_WRITE_CONCURRENT_INSERT

    These columns aggregate internal write locks.

  • COUNT_WRITE_LOW_PRIORITY,SUM_TIMER_WRITE_LOW_PRIORITY,MIN_TIMER_WRITE_LOW_PRIORITY,AVG_TIMER_WRITE_LOW_PRIORITY,MAX_TIMER_WRITE_LOW_PRIORITY

    These columns aggregate internal write locks.

  • COUNT_WRITE_NORMAL,SUM_TIMER_WRITE_NORMAL,MIN_TIMER_WRITE_NORMAL,AVG_TIMER_WRITE_NORMAL,MAX_TIMER_WRITE_NORMAL

    These columns aggregate internal write locks.

  • COUNT_WRITE_EXTERNAL,SUM_TIMER_WRITE_EXTERNAL,MIN_TIMER_WRITE_EXTERNAL,AVG_TIMER_WRITE_EXTERNAL,MAX_TIMER_WRITE_EXTERNAL

    These columns aggregate external write locks.

Thetable_lock_waits_summary_by_table table has these indexes:

  • Unique index on (OBJECT_TYPE,OBJECT_SCHEMA,OBJECT_NAME)

TRUNCATE TABLE is permitted for table lock summary tables. It resets the summary columns to zero rather than removing rows.