redolog / blog-comment

Blog comment using gitalk.
0 stars 0 forks source link

mysql in 查询索引失效问题一例 | 宋惠龙的博客 #177

Open redolog opened 7 months ago

redolog commented 7 months ago

https://redolog.github.io/posts/rd/troubleshoot/mysql/index/in-ineffective/

排查了一则MySQL中in查询传入270个入参则 索引失效 的问题,本文记录分析与解决的过程。

redolog commented 7 months ago

在能保证in传入的参数区分度ok并且查出的总数据量不是过大的情况下,可以考虑使用force index。