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

Home -> Community -> Usenet -> c.d.o.tools -> Re: union problem

Re: union problem

From: Daniel A. Morgan <Daniel.Morgan_at_attws.com>
Date: Tue, 12 Jun 2001 12:36:41 -0700
Message-ID: <3B266F49.B2A013D7@attws.com>

kazelot_at_thenut.eti.pg.gda.pl wrote:

> I have two sql queries joined with union.
> Each query separately executes in about 0.1s.
> query1 union query2 takes more then 50s, which is about 500 times more.
>
> Is it possible? I mean it is because I got this results :-), but what what
> could happend?
>
> Thanks for any suggestions,
> kazelot

UNION adds an additional step. One that looks for duplicates in the two query results. If you know that the two queries will return different result sets, or if you don't care about duplicates, use UNION ALL.

Daniel A. Morgan Received on Tue Jun 12 2001 - 14:36:41 CDT

Original text of this message

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