Subject | Re: derived table within EXISTS (was: Different performance Superserver VS. Embeded ?) |
---|---|
Author | danyschaer |
Post date | 2008-02-25T17:50:40Z |
Hi Set,
Well, I thougth about how selective is MOVI.PROC so I did a few tests
adding the "distinct" clause, even with your approach, but same results:
select p.PROC, p.EXP1 as EXPE, p.ACTO, p.DEMA, p.OBSE, t.DSCR as D_TPRO
from PROC p
left join TPRO t on p.TPRO=t.TPRO
where exists(select distinct PROC from MOVI m
where p.PROC = m.PROC
and m.TIPO = 'B')
order by lower(p.ACTO)
Dany
Well, I thougth about how selective is MOVI.PROC so I did a few tests
adding the "distinct" clause, even with your approach, but same results:
select p.PROC, p.EXP1 as EXPE, p.ACTO, p.DEMA, p.OBSE, t.DSCR as D_TPRO
from PROC p
left join TPRO t on p.TPRO=t.TPRO
where exists(select distinct PROC from MOVI m
where p.PROC = m.PROC
and m.TIPO = 'B')
order by lower(p.ACTO)
Dany