Re: ORDER BY and LIMIT not propagated on inherited - Mailing list pgsql-performance

From Tom Lane
Subject Re: ORDER BY and LIMIT not propagated on inherited
Date
Msg-id 14074.1125672054@sss.pgh.pa.us
Whole thread Raw
In response to Re: ORDER BY and LIMIT not propagated on inherited  (Matteo Beccati <php@beccati.com>)
Responses Re: ORDER BY and LIMIT not propagated on inherited
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Advise about how to delete entries
Next
From: Matteo Beccati
Date:
Subject: Re: ORDER BY and LIMIT not propagated on inherited