Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Optimization of UNION
Hello everybody !
If I have to queries on the same columns of the same tables, will the optimizer make a OR statement from a UNION? (I think, OR will be faster normally, right?)
For example, If I use
select col1
from table1
where col2=xyz
union
select col1
from table2
where col3=abc
will this be optimized to "where col2=xyz or col3=abc" ? And if yes, can the optimizer do this also on queries which do not have all (but some) the same tables in the select statement ? Could I give the optimizer a hint for this ?
Ciao, Michael.
--
Michael Keppler, MCSE
IT logic GbR
Michael.Keppler_at_gmx.de
Received on Thu Sep 09 1999 - 06:36:56 CDT