Re: Partitioning... -> solved

From: "Milen Kulev" <makulev(at)gmx(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Jim C(dot) Nasby'" <jnasby(at)pervasive(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Partitioning... -> solved
Date: 2006-06-14 19:44:40
Message-ID: 014601c68fea$fa0c57f0$0a00a8c0@trivadis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Tom,
OFFSET is even better solution for me .

Regards. Milen

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, June 14, 2006 3:57 PM
To: Milen Kulev
Cc: 'Jim C. Nasby'; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Partitioning...

"Milen Kulev" <makulev(at)gmx(dot)net> writes:
> Thanks Jim, the "trick" worked for me !

>> You might need to add an ORDER BY to the subquery to ensure
>> PostgreSQL doesn't pull it into the main query.

Actually, the usual trick is "OFFSET 0", which works just as well as an optimization fence and doesn't force any
significant extra work. Of course, if you *need* an ORDER BY then that's what to use, but it's overkill if you just want
to prevent flattening the subquery.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Terry Lee Tucker 2006-06-14 19:57:37 Performance Question
Previous Message Relyea, Mike 2006-06-14 17:59:56 Out of memory error in 8.1.0 Win32