首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql查询锁表了,该如何解决

2012-07-28 
mysql查询锁表了select sum(fee) as Fee from ACCOUNT2.feecdr2 where (uid any(select buid from ACCOU

mysql查询锁表了
select sum(fee) as Fee from ACCOUNT2.feecdr2 where (uid = any(select buid from ACCOUNT2.person where cid=1001) or uid=any(select muid from ACCOUNT2.person where cid=1001) or uid=123456789) and begintime>date_sub(now(),interval 56 DAY) and begintime<date_sub(now(),interval 25 DAY) and type=24


这个查询语句要查询半个小时都没查出来,锁表了。 各位老大帮忙看下,先谢了!

[解决办法]
你先确认到底是表记录多,查询速度慢

还是其他语句把表锁住了
[解决办法]
show processlists; 看一下哪些进程在运行和锁表。

热点排行