把distinct 换成group by select x.A,x.B,p.C,p.D,f.E
from Pkgmain p,fabmain f,#x x
where x.A=p.A and x.B=p.B and p.C=f.c
group by x.A,x.B,p.C,p.D,f.E
order by x.sppono,x.sproductno
from Pkgmain p,fabmain f,#x x
where x.A=p.A and x.B=p.B and p.C=f.c
group by x.A,x.B,p.C,p.D,f.E
order by x.sppono,x.sproductno
fabmain的c
#x的a,b建索引
换group by 怎么个换法?给我写一下好吗?
还有索引我已经建了
from Pkgmain p,fabmain f,#x x
where x.A=p.A and x.B=p.B and p.C=f.c group by x.A,x.B,p.C,p.D,f.Eorder by x.sppono,x.sproductno一般选择非重复项,数据多的时候,distinct 很慢,不如利用group by 的分组了
刚才我换成group by 了可还是不行啊,还需要7秒钟。happydreamer(小黑) 我该做怎么样的改进呀,请多指教!