mysql怪异问题 对于个别值查询慢

有两个表所有的查询速度都很快,只有cid=5的情况下速度会很慢,重建索引也没见效果;
这是什么问题导致的。存在着歌问题貌似有段时间了,count了下数量,cid=5的条数最少,查询时间最耗时;

mysql> SELECT `uuid` FROM `ey_article` WHERE `cid` = 4 ORDER BY kid DESC LIMIT 0,1;
+----------------------------------+
| uuid                               |
+----------------------------------+
| 62ff694813f3c564484d864d977bfd50 |
+----------------------------------+
1 row in set (0.01 sec)

mysql> SELECT `uuid` FROM `ey_article` WHERE `cid` = 1 ORDER BY kid DESC LIMIT 0,1;
+----------------------------------+
| uuid                               |
+----------------------------------+
| 1246f583e18537d10fbd6c65dd258396 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> SELECT `uuid` FROM `ey_article` WHERE `cid` = 2 ORDER BY kid DESC LIMIT 0,1;
+----------------------------------+
| uuid                               |
+----------------------------------+
| d73421575ca1af800df8dedf200d8da4 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> SELECT `uuid` FROM `ey_article` WHERE `cid` = 5 ORDER BY kid DESC LIMIT 0,1;
+----------------------------------+
| uuid                               |
+----------------------------------+
| b32d55762b848758c885b7a5c1a027cf |
+----------------------------------+
1 row in set (2.61 sec)
阅读 1.8k
1 个回答
新手上路,请多包涵

你的问题解决了吗?,我也遇到相似的问题了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题