Re: Limit + group + join

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, Tobias Brox <tobias(at)nordicbet(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Limit + group + join
Date: 2005-08-27 03:03:30
Message-ID: 87mzn484jh.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2005-08-27 06:19:49 Re: Need indexes on empty tables for good performance ?
Previous Message Mark Kirkwood 2005-08-27 02:55:22 Re: Limit + group + join