现在有3张表,每张表大概80w 记录,现在对三张表进行Join 发现需要5秒左右,用profiling 发现大部分时间消耗在sending data.select e.id
from a as e
join b as f on e.id=f.id
join c as g on e.id=g.id其中Id 是三个表中的主键。

解决方案 »

  1.   

    五秒都算快的了sending八十万数据到客户端当然需要点时间
      

  2.   

    我的表有400万数据,以下的查询,达到了28秒,其中Sending data为27秒以上,不知是啥原因哦!
    districtlist已建索引,以下是查询语句:
    select `phone`,`seat` from `numbers` where `districtlist`=3 order by `porder` asc limit 101182
      

  3.   

    对于E表,需要80W记录?而且只需要ID主键?检查下你的业务是否有问题。