Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Ora 9.2 SQL: What's the fastest way to do this set operation...

Re: Ora 9.2 SQL: What's the fastest way to do this set operation...

From: <joel-garry_at_home.com>
Date: 1 May 2006 14:44:39 -0700
Message-ID: <1146519879.403717.192220@g10g2000cwb.googlegroups.com>


While I think Brian is correct (as usual), and I'm too lazy to think about this in detail (as usual), I think you might benefit from examining explain plans and checking out http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:62364503028143 . I suspect the distincts are forcing a lot of unnecessary sorts and opine that playing around with rownum positioning controlling the various selects, watching the effect on plans, might allow the intersect pruning you desire. If you can get there, that might be better than PL. Also, I'm unsure if rownum can short-circuit the sort in having/group by, but if so that might be a way to get "at least one."

jg

-- 
@home.com is bogus.
http://www.spectrum.ieee.org/mar06/3069/1
Received on Mon May 01 2006 - 16:44:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US