本帖最后由 counter198 于 2011-09-06 21:32:02 编辑

解决方案 »

  1.   

    create index xx x on tbl_zb_point_log (point_id, create_time)
      

  2.   

    order by id ASC limit 1;
      

  3.   

    1楼 的 组合索引的效率 并没有提升多少,二楼说所的 limit 1 我是用到了 ,但是对于越来越大的表的话 效率 还是不行, 考虑三楼的建议 可能是要建多张表 还是有点麻烦 !散分吧 我这个需求说的也不是明确。
      

  4.   

    贴出你的 explain select pl.id,pl.data,pl.node_log_id,pl.create_time from tbl_zb_point_log as pl where create_time >= '2011-09-05 19:56:50' and create_time <= '2011-09-05 20:56:50' and pl.point_id = 300 order by create_time ASC limit 1;然后再 show index from tbl_zb_point_log ; 贴出来以供分析。