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

Home -> Community -> Usenet -> c.d.o.server -> Re: Optimization of UNION

Re: Optimization of UNION

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 9 Sep 1999 20:15:44 +0100
Message-ID: <936904974.4272.0.nnrp-12.9e984b29@news.demon.co.uk>

Was it 7.3.4 perhaps - there a a few things that are in 7.3.4 and 8.1 but not in 8.0.

This optimizer trick is a new one on me though. I knew that an IN list could be converted to a UNION ALL, but I didn't think it could work the other way round, and when I read the post I thought it VERY unlikely that a UNION would be converted.

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Connor McDonald wrote in message <37D7A19B.496D_at_yahoo.com>...
>
>Interesting, I was giving a tuning course the other day, and this
>intersting thing came up
>
>In 7.3
>
>select ...
>from table
>where un_indexed_col = val1
>UNION ALL
>select ...
>from table
>where un_indexed_col = val1
>
>was (correctly) changed to OR and thus one scan by the optimiser...The
>same thing in 8.0.5 (same schema, blocksize, tables etc) did not...Hmmm
>
Received on Thu Sep 09 1999 - 14:15:44 CDT

Original text of this message

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