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: <kazelot_at_thenut.eti.pg.gda.pl>
Date: Wed, 13 Jun 2001 07:55:02 +0200
Message-ID: <Pine.LNX.4.33.0106130754100.25539-100000@thenut.eti.pg.gda.pl>

> 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

Thank you, Daniel!
My query now takes 0.2s instead of 50s. Received on Wed Jun 13 2001 - 00:55:02 CDT

Original text of this message

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