mysql 优化问题 Using where; Using filesort

落伍的鱼 落伍的鱼 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区




explain select userid from team_enewsmember where agentid in(select userid from team_enewsmember where agentid='2' and levelid>=1 group by userid) and levelid>=1 group by userid

如果主键userid与agentid联合索引就会出现 Using where; Using index

怎么都去不掉 Using where; Using filesort,请高手指点。
...全文
评论 10
收藏 已收藏
分享
返回顶部
落伍的鱼
PHP 20,393 成员 19,654 内容