Skip site navigation (1) Skip section navigation (2)

Re: Limit + group + join

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tobias Brox <tobias(at)nordicbet(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Limit + group + join
Date: 2005-08-26 23:29:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Tom Lane wrote:
> Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> writes:
>>What is interesting is why this plan is being rejected...
> Which PG version are you using exactly?  That mistake looks like an
> artifact of the 8.0 "fuzzy plan cost" patch, which we fixed recently:

Right on - 8.0.3 (I might look at how CVS tip handles this, could be 

> But Tobias wasn't happy with 7.4 either, so I'm not sure that the fuzzy
> cost issue explains his results.
> 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.

That doesn't explain why the nested loop is being kicked tho', or have I 
missed something obvious? - it's been known to happen :-)...



In response to


pgsql-performance by date

Next:From: Tom LaneDate: 2005-08-26 23:31:51
Subject: Re: Weird performance drop after VACUUM
Previous:From: Michael FuhrDate: 2005-08-26 23:26:41
Subject: Re: Weird performance drop after VACUUM

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group