inner join 和笛卡尔积
我的SQL如下:select a1.sjtype,a1.fmdm,a1.pdname,a2.zsjg,a2.zsmc,a1.fmmc from
(select * from "v_fm" where pdtype='0201' and ywcode='01' and zoneno='02502')a1
inner join
(select distinct zsjg,sjtype,zsmc from "v_de" where conflag='1'
and pdtype='0201' and ywcode='01' and zoneno='02502' and
(fhdate>='20121015' and fhdate<='20121115') )a2
on a1.sjtype=a2.sjtype and a1.zsdm=a2.zsjg
我把inner join on 去掉以后用笛卡尔积时间消耗差不多都是二十多秒
我不明白怎么用inner join时间还是提不上去?我把inner join换成
righ join时间消耗才2秒。这个怎么办 又不可以换成right join了。