From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matteo Beccati <php@beccati.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: ORDER BY and LIMIT not propagated on inherited
Date: Fri, 02 Sep 2005 10:40:54 -0400
Message-ID: <14074.1125672054@sss.pgh.pa.us> (raw)
In-Reply-To: <43184B8F.2090505@beccati.com>
References: <43182789.4070307@beccati.com>
<1125664532.3956.278.camel@localhost.localdomain>
<43184B8F.2090505@beccati.com>
Matteo Beccati <php@beccati.com> writes:
> The correct strategy IMHO would
> be applying the order by and limit for each child table (which results
> in an index scan, if possible), appending, then finally sorting a bunch
> of rows, and limiting again.
This would be a win in some cases, and in many others a loss (ie, wasted
sort steps). The hard part is determining when to apply it.
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, php@beccati.com, simon@2ndquadrant.com
Subject: Re: ORDER BY and LIMIT not propagated on inherited
In-Reply-To: <14074.1125672054@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