Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: union problem
> 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
![]() |
![]() |