Re: Partitioning... - Mailing list pgsql-general

From Tom Lane
Subject Re: Partitioning...
Date
Msg-id 23345.1150293415@sss.pgh.pa.us
Whole thread Raw
In response to Re: Partitioning...  ("Milen Kulev" <makulev@gmx.net>)
Responses Re: Partitioning... -> solved
List pgsql-general
"Milen Kulev" <makulev@gmx.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

pgsql-general by date:

Previous
From: Jan Behrens
Date:
Subject: Re: COLLATE
Next
From: Tom Lane
Date:
Subject: Re: Problem Connecting to 5432