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

Re: merge join killing performance

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: merge join killing performance
Date: 2010-05-20 01:46:29
Message-ID: alpine.DEB.2.00.1005192143570.6090@aragorn.flymine.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
On Wed, 19 May 2010, Scott Marlowe wrote:
>> It's apparently estimating (wrongly) that the merge join won't have to
>> scan very much of "files" before it can stop because it finds an eid
>> value larger than any eid in the other table.  So the issue here is an
>> inexact stats value for the max eid.

I wandered if it could be something like that, but I rejected that idea, 
as it obviously wasn't the real world case, and statistics should at least 
get that right, if they are up to date.

> I changed stats target to 1000 for that field and still get the bad plan.

What do the stats say the max values are?

Matthew

-- 
 Nog:     Look! They've made me into an ensign!
 O'Brien: I didn't know things were going so badly.
 Nog:     Frightening, isn't it?

In response to

Responses

pgsql-performance by date

Next:From: Scott MarloweDate: 2010-05-20 02:04:18
Subject: Re: merge join killing performance
Previous:From: Scott MarloweDate: 2010-05-19 20:47:06
Subject: Re: merge join killing performance

pgsql-hackers by date

Next:From: Scott MarloweDate: 2010-05-20 02:04:18
Subject: Re: merge join killing performance
Previous:From: Kevin GrittnerDate: 2010-05-20 00:37:26
Subject: WIP patch for serializable transactions with predicate locking

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