Re: UNION vs UNION ALL

From: Loyal Barber <lbarber_at_ix.netcom.com>
Date: 1996/08/29
Message-ID: <3225A619.1A0B_at_ix.netcom.com>#1/1


Danny Roosens wrote:
>
> Hi,
>
> is it fair to say that one should use
>
> 'UNION ALL' as default
> and use 'UNION' only when duplicates are expected and not wanted
>
> because it's faster.
It is exactly true. For a union, Oracle has to first do a union all then sort the data then suppress the duplicates. Obviously this takes much more time. Received on Thu Aug 29 1996 - 00:00:00 CEST

Original text of this message