Re: merge join killing performance

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Matthew Wakeling <matthew(at)flymine(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: merge join killing performance
Date: 2010-05-19 03:06:25
Message-ID: AANLkTinmK2qgKBQXpMZ0rDa66OsGH1MynmVwfkh1PZVy@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Tue, May 18, 2010 at 9:00 PM, Matthew Wakeling <matthew(at)flymine(dot)org> wrote:
> On Tue, 18 May 2010, Scott Marlowe wrote:
>>
>> Aggregate  (cost=902.41..902.42 rows=1 width=4)
>>  ->  Merge Join  (cost=869.97..902.40 rows=1 width=4)
>>        Merge Cond: (f.eid = ev.eid)
>>        ->  Index Scan using files_eid_idx on files f
>> (cost=0.00..157830.39 rows=3769434 width=8)
>
> Okay, that's weird. How is the cost of the merge join only 902, when the
> cost of one of the branches 157830, when there is no LIMIT?
>
> Are the statistics up to date?

Yep. The explain analyze shows it being close enough it should guess
right (I think) We have default stats target set to 200 and the table
is regularly analyzed by autovac, which now has much smaller settings
for threshold and % than default to handle these big tables.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-05-19 03:59:53 Re: Stefan's bug (was: max_standby_delay considered harmful)
Previous Message Matthew Wakeling 2010-05-19 03:00:18 Re: merge join killing performance

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2010-05-19 16:53:03 Re: merge join killing performance
Previous Message Matthew Wakeling 2010-05-19 03:00:18 Re: merge join killing performance