The table_lock_waits_summary_by_table Table
The table_lock_waits_summary_by_table table aggregates all table lock wait events, as generated by the wait/lock/table/sql/handler instrument. The grouping is by table.
TRUNCATE TABLE is permitted for summary tables. It resets the counters to zero rather than removing rows.
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 to
thr_lock(). In event rows, these locks are distinguished by theOPERATIONcolumn, which will have one of these values:read normal read with shared locks read high priority read no insert write allow write write concurrent insert write delayed write low priority write normal
- An external lock corresponds to a lock in the storage engine layer. This is currently implemented by a call to
handler::external_lock(). In event rows, these locks are distinguished by theOPERATIONcolumn, which will have one of these values:read external write external
The table_lock_waits_summary_by_table table has these grouping columns to indicate how events are aggregated: OBJECT_TYPE, OBJECT_SCHEMA, and OBJECT_NAME. These columns have the same meaning as in the events_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 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_WAITThese columns aggregate all lock operations. They are the same as the sum of the corresponding
andxxx_READcolumns.xxx_WRITECOUNT_READ,SUM_TIMER_READ,MIN_TIMER_READ,AVG_TIMER_READ,MAX_TIMER_READThese columns aggregate all read-lock operations. They are the same as the sum of the corresponding
,xxx_READ_NORMAL,xxx_READ_WITH_SHARED_LOCKS, andxxx_READ_HIGH_PRIORITYcolumns.xxx_READ_NO_INSERTCOUNT_WRITE,SUM_TIMER_WRITE,MIN_TIMER_WRITE,AVG_TIMER_WRITE,MAX_TIMER_WRITEThese columns aggregate all write-lock operations. They are the same as the sum of the corresponding
,xxx_WRITE_ALLOW_WRITE,xxx_WRITE_CONCURRENT_INSERT,xxx_WRITE_DELAYED, andxxx_WRITE_LOW_PRIORITYcolumns.xxx_WRITE_NORMALCOUNT_READ_NORMAL,SUM_TIMER_READ_NORMAL,MIN_TIMER_READ_NORMAL,AVG_TIMER_READ_NORMAL,MAX_TIMER_READ_NORMALThese 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_LOCKSThese 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_PRIORITYThese 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_INSERTThese columns aggregate internal read locks.
COUNT_READ_EXTERNAL,SUM_TIMER_READ_EXTERNAL,MIN_TIMER_READ_EXTERNAL,AVG_TIMER_READ_EXTERNAL,MAX_TIMER_READ_EXTERNALThese 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_WRITEThese 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_INSERTThese columns aggregate internal write locks.
COUNT_WRITE_DELAYED,SUM_TIMER_WRITE_DELAYED,MIN_TIMER_WRITE_DELAYED,AVG_TIMER_WRITE_DELAYED,MAX_TIMER_WRITE_DELAYEDThese 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_PRIORITYThese columns aggregate internal write locks.
COUNT_WRITE_NORMAL,SUM_TIMER_WRITE_NORMAL,MIN_TIMER_WRITE_NORMAL,AVG_TIMER_WRITE_NORMAL,MAX_TIMER_WRITE_NORMALThese columns aggregate internal write locks.
COUNT_WRITE_EXTERNAL,SUM_TIMER_WRITE_EXTERNAL,MIN_TIMER_WRITE_EXTERNAL,AVG_TIMER_WRITE_EXTERNAL,MAX_TIMER_WRITE_EXTERNALThese columns aggregate external write locks.