select st_id,st_day,st_sc_id,st_s_id,st_p_id,st_nums tdn,st_money tdm
from sum_total where st_id in (select max(st_id) from sum_total where
st_day<=1286121600 and st_sc_id=8 and st_s_id=31
group by st_s_id,st_p_id)
这句SQL应该怎么样优化下才可以执行的快一点么?求大侠指点
from sum_total where st_id in (select max(st_id) from sum_total where
st_day<=1286121600 and st_sc_id=8 and st_s_id=31
group by st_s_id,st_p_id)
这句SQL应该怎么样优化下才可以执行的快一点么?求大侠指点
有兴趣的同学移步
http://topic.csdn.net/u/20101005/10/82df90a4-4e6a-487f-835c-6eeedc2f1273.html