Re: A slow query - Help please?

From: "hubert depesz lubaczewski" <depesz(at)gmail(dot)com>
To: "Alban Hertroys" <alban(at)magproductions(dot)nl>
Cc: "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: A slow query - Help please?
Date: 2006-06-20 18:21:57
Message-ID: 9e4684ce0606201121m22449830m6dea3d730b775deb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/19/06, Alban Hertroys <alban(at)magproductions(dot)nl> wrote:
>
> I found a way that works, and is indeed quite a bit faster. It is even
> uglier than what you proposed. The problem wasn't the "order by" in the
> subquery, but the "order by" combined with the "union":

sorry, i always forget about the fact that union doesn't like internal
order and limits. subquery is of course perfectly fine - i'm glad you found
that :)

depesz

--
http://www.depesz.com/ - nowy, lepszy depesz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-06-20 19:41:09 Re: Exporting data from view
Previous Message Jasbinder Bali 2006-06-20 18:03:06 Re: Help requd in writing functions in C and using in Postgres