mysql left join 导致的 Using join buffer (Block Nested Loop)
问题在给运营部门写一个简单的两表join的时候,发现线上的数据库很快,本地的数据库很慢。selectdtas'日期',avg(time1-time2)from(selecttradeid,time1asdtfromtable1where条件)aleftjoin(selecttradeid,time2fromtable2where条件)bona.tradeid=b.tradeidgroupbydt两