Re: Limit + group + join - Mailing list pgsql-performance

From Greg Stark
Subject Re: Limit + group + join
Date
Msg-id 87mzn484jh.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Limit + group + join  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> writes:

> As far as the "desc" point goes, the problem is that mergejoins aren't
> capable of dealing with backward sort order, so a merge plan isn't
> considered for that case (or at least, it would have to have a sort
> after it, which pretty much defeats the point for a fast-start plan).
> I have some ideas about fixing this but it won't happen before 8.2.

Of course in this case assuming "id" is an integer column you can just sort by
-id instead.

--
greg

pgsql-performance by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Limit + group + join
Next
From: Thomas Ganss
Date:
Subject: Re: Caching by Postgres