Re: Partitioning...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Milen Kulev" <makulev(at)gmx(dot)net>
Cc: "'Jim C(dot) Nasby'" <jnasby(at)pervasive(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Partitioning...
Date: 2006-06-14 13:56:55
Message-ID: 23345.1150293415@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-06-14 14:18:46 Re: Problem Connecting to 5432
Previous Message Guido Neitzer 2006-06-14 13:06:25 Re: Copy content from dbs