Mysql deletes the data and executes slowly and the delete fails-the thread is blocked

  • Solution:

The database executes the SQL statement query which thread is blocked

SELECT * FROM information_schema.innodb_trx

Check the trx_rows_locked column if it is greater than 0, it means that it is blocked, and then check the corresponding trx_mysql_thread_id column to
see a thread ID
and then execute SQL, kill thread ID

kill trx_mysql_thread_id 对应的值
 
Published 266 original articles · praised 17 · 10,000+ views

Guess you like

Origin blog.csdn.net/qq_18671415/article/details/105410245