MYSQL5.7查询缓慢 Using where; Using join buffer (Block Nested Loop)

explain
select t1.company_name,t1.subject_name,t1.business_line,t1.dicker,t1.months,t1.amount '当月金额',t1.amount '累计金额'   from f_finance_business_2022 t1
inner join f_finance_business_2022 t2
on t1.company_name=t2.company_name
and t1.subject_name=t2.subject_name
and t1.business_line=t2.business_line
and t1.dicker=t2.dicker
and t1.months=t2.months
and t2.type='累计发生'
and t2.data_sources='执行'
where t1.type='当月发生'
and t1.data_sources='执行'

MySQL5.7执行计划

MySQL8.0执行计划

该表没有索引,数据量10w+,同一张表不存在字段类型不一致情况,那位大佬知道MySQL5.7为啥走 Block Nested Loop

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值