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: tuning

Re: tuning

From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Tue, 13 Oct 1998 12:15:06 +0100
Message-ID: <6vvcml$jsf$1@schbbs.mot.com>


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

Original text of this message

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