Lock Struct(s)MySQL?

时间:2017-03-29 07:54:28

标签: mysql database innodb cpu

我目前正在使用我的MSQL面临一个有趣的情况。

在“发送数据”状态下,我将相同的SELECT查询停留在“processlist”下超过1500秒。

如果我手动运行SELECT查询(通过终端或phpMyAdmin),结果会在一秒内返回。

我做了一些研究并找到了“SHOW ENGINE INNODB STATUS”并发现了很多与输出相同的SELECT查询。

    ---TRANSACTION 14304425756, ACTIVE 1426 sec fetching rows
mysql tables in use 105, locked 0
1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 1
MySQL thread id 10070680, OS thread handle 0x7fb4ac04e700, query id 1360340216 192.168.1.15 root2 Sending data
SELECT ------------------- SELECT QUERY HERE ---------------------------------------------------------------------------------------------
Trx read view will not see trx with id >= 14304425757, sees < 14302154103
---TRANSACTION 14304424080, ACTIVE 1427 sec fetching rows
mysql tables in use 105, locked 0
1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 1
MySQL thread id 10069995, OS thread handle 0x7fb4ac86e700, query id 1360338104 192.168.1.15 root2 Sending data
SELECT ------------------- SELECT QUERY HERE ---------------------------------------------------------------------------------------------
Trx read view will not see trx with id >= 14304424081, sees < 14302154103
---TRANSACTION 14304406358, ACTIVE 1436 sec fetching rows
mysql tables in use 105, locked 0
1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 1
MySQL thread id 10070125, OS thread handle 0x7fb46fa69700, query id 1360309566 192.168.1.16 root2 Sending data
SELECT ------------------- SELECT QUERY HERE ---------------------------------------------------------------------------------------------
Trx read view will not see trx with id >= 14304406359, sees < 14302154103
---TRANSACTION 14304371566, ACTIVE 1452 sec fetching rows
mysql tables in use 105, locked 0
1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 1
MySQL thread id 10070898, OS thread handle 0x7fb4ac2d8700, query id 1360253083 192.168.1.16 root2 Sending data
SELECT ------------------- SELECT QUERY HERE ---------------------------------------------------------------------------------------------
Trx read view will not see trx with id >= 14304371567, sees < 14302068053
---TRANSACTION 14304339535, ACTIVE 1469 sec fetching rows
mysql tables in use 105, locked 0
1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 1
MySQL thread id 10070052, OS thread handle 0x7fb4acaf8700, query id 1360198771 192.168.1.16 root2 Sending data
SELECT ------------------- SELECT QUERY HERE ---------------------------------------------------------------------------------------------
Trx read view will not see trx with id >= 14304339536, sees < 14302068053

以上是什么意思?

由于大量SELECT查询被卡住,似乎会使我的数据库过载。

谢谢!

0 个答案:

没有答案