版本5.5表的引擎為innodb在執(zhí)行一個很簡單的update語句時經(jīng)常會鎖住,如下表。表里的數(shù)據(jù)很少,不到2000,如果說特別也就是有一個blob字段,別的沒什么特別的了。并發(fā)量也不大。我是不明白這么簡單的一個語句為什么會卡在這?求教求教~+-------+-----------------+-----------------+------+---------+------+-----------------------------+----------------------------------------------------------------------------+|Id|User|Host|db|Command|Time|State|Info|+-------+-----------------+-----------------+------+---------+------+-----------------------------+----------------------------------------------------------------------------+|20959|event_scheduler|localhost|NULL|Daemon|16|Waitingfornextactivation|NULL||72840|root|localhost|**|Query|0|NULL|showfullprocesslist||72901|root|localhost:57842|**|Query|39|Updating|updatetable_namesetviews=ifnull(views,0)+1where1=1andid='2349'||72902|root|localhost:57843|**|Sleep|5||NULL||72903|root|localhost:57844|**|Sleep|48||NULL||72904|root|localhost:57845|**|Sleep|48||NULL||72906|root|localhost:57846|**|Query|22|Updating|updatetable_namesetviews=ifnull(views,0)+1where1=1andid='2349'||72907|root|localhost:57847|**|Query|37|Updating|updatetable_namesetviews=ifnull(views,0)+1where1=1andid='2262'||72911|root|localhost:57849|**|Sleep|60||NULL||72912|root|localhost:57850|**|Sleep|47||NULL||72919|root|localhost:57852|**|Sleep|0||NULL||72920|root|localhost:57853|**|Query|26|Updating|updatetable_namesetviews=ifnull(views,0)+1where1=1andid='2349'||72922|root|localhost:57854|**|Sleep|72||NULL||72923|root|localhost:57855|**|Sleep|72||NULL||72924|root|localhost:57856|**|Sleep|72||NULL|+-------+-----------------+-----------------+------+---------+------+-----------------------------+----------------------------------------------------------------------------+
mysql鎖的問題
溫溫醬
2019-03-29 22:11:12