From: Tom Lane <tgl@sss.pgh.pa.us>
To: Milen Kulev <makulev@gmx.net>
Cc: 'Jim C. Nasby' <jnasby@pervasive.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Partitioning...
Date: Wed, 14 Jun 2006 09:56:55 -0400
Message-ID: <23345.1150293415@sss.pgh.pa.us> (raw)
In-Reply-To: <010801c68fa8$46744320$0a00a8c0@trivadis.com>
References: <010801c68fa8$46744320$0a00a8c0@trivadis.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, makulev@gmx.net, jnasby@pervasive.com
Subject: Re: Partitioning...
In-Reply-To: <23345.1150293415@sss.pgh.pa.us>
References: <010801c68fa8$46744320$0a00a8c0@trivadis.com> <23345.1150293415@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox