Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: tuning
Using UNION there is an implied sort going on which is how the duplicates
are removed. Maybe this is what is slowing down the query. Assuming that
the individual SELECTs produce distinct records then try a UNION ALL. This
doesnl;t remove duplicates and so may not perform the sort. I haven't
proved this but worth a try.
--
Alan D. Mills
Corinna Becker wrote in message
<01bdf695$0b7c56e0$a049100a_at_pc743-sode.seurope.ikea.com>...
>Hello,
>I have the following statement:
>
>select 'A', t1.* from table1 t1
>UNION
>select 'B', t2.* from table2 t2;
>
>Each select statement is running ok, but together with the UNION it takes
>much too long. How can I tune something like this?
>Thanks in advance
>Corinna Becker
Received on Tue Oct 13 1998 - 06:15:06 CDT