Re: optimising UNION performance - Mailing list pgsql-general

From Ragnar
Subject Re: optimising UNION performance
Date
Msg-id 1156756304.26837.106.camel@localhost.localdomain
Whole thread Raw
In response to optimising UNION performance  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
Responses Re: optimising UNION performance  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
List pgsql-general
On mán, 2006-08-28 at 10:23 +0200, Rafal Pietrak wrote:
> Hi all,
>
> Is there a way to speed up the query to my 'grand total' logfile,
> constructed as a UNION of smaller (specialised) logfiles?
>

I do not know if this is relevant to your case, but
possibly you can use a UNION ALL instead of a UNION.

In many cases the UNION ALL gives petter performance,
as the unique step can be skipped, as well as a sort
needed by the unique.

gnari



pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: speeding up big query lookup
Next
From: Bjørn T Johansen
Date:
Subject: Convert time to millisec?