This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-21. For the latest, interactive version please visit https://mariadb.com/kb/.

innodb_lock_waits and x$innodb_lock_waits Sys Schema Views

MariaDB starting with 10.6

These Sys Schema views were introduced in MariaDB 10.6.

Description

The innodb_lock_waits and x$innodb_lock_waits views summarize InnoDB locks that transactions are waiting upon, by default sorted in descending buffer size.

The innodb_lock_waits view is intended to be easier for human reading, while the x$innodb_lock_waits view provides the data in raw form, intended for tools that process the data.

They contain the following columns:

ColumnDescription
wait_startedTime that lock wait began.
wait_ageTIME value for the length of the lock wait.
wait_age_secsSeconds value for the length of the lock wait.
locked_table_schemaSchema containing the locked table.
locked_table_nameName of the locked table.
locked_table_partitionName of the locked partition, or NULL if none.
locked_table_subpartitionName of the locked subpartition, or NULL if none.
locked_indexName of the locked index.
locked_typeType of the waiting lock.
waiting_trx_idID of the waiting transaction.
waiting_trx_startedTime that the waiting transaction started.
waiting_trx_ageTIME value for the length of time that the transaction has been waiting.
waiting_trx_rows_lockedNumber of rows locked by the waiting transaction.
waiting_trx_rows_modifiedNumber of rows modified by the waiting transaction.
waiting_pidProcesslist ID of the waiting transaction.
waiting_queryStatement waiting for the lock.
waiting_lock_idID of the waiting lock.
waiting_lock_modeMode of the waiting lock.
blocking_trx_idID of the transaction blocking the waiting lock.
blocking_pidProcesslist ID of the blocking transaction.
blocking_queryStatement the blocking transaction is executing, or NULL if the session that issued the blocking query has become idle.
blocking_lock_idID of the lock blocking the waiting lock.
blocking_lock_modeMode of the lock blocking the waiting lock.
blocking_trx_startedTime the blocking transaction started.
blocking_trx_ageTIME value for how long the blocking transaction has been executing.
blocking_trx_rows_lockedNumber of rows locked by the blocking transaction.
blocking_trx_rows_modifiedNumber of rows modified by the blocking transaction.
sql_kill_blocking_queryKILL statement that could be used to kill the blocking statement.
sql_kill_blocking_connectionKILL statement that could be used to kill the blocking statement session.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.