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

Re: Problem with mergejoin performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: azajac(at)ang(dot)com(dot)pl
Cc: pgsql-performance(at)postgreSQL(dot)org
Subject: Re: Problem with mergejoin performance
Date: 2010-09-13 15:16:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
[ Please keep the list cc'd ]

<azajac(at)ang(dot)com(dot)pl> writes:
>> What exactly are those join key values, and what are the min/max values
>> in bug_t2?

> min of = 42,
> max of = 393065,
> min of = 352448,
> max of = 388715,

> select count(id) from bug_t2
> 	29
> select count(*) from bug_t2
> 	278417
> And because there is only 29 not null records in bug_t2:

Oh, that's the real problem: thousands of nulls in bug_t2.
The planner is thinking those don't have to be scanned, but
the executor wasn't on the same page until very recently:

That patch will be in the next 8.3 update.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Gaetano MendolaDate: 2010-09-13 15:55:46
Subject: Re: Useless sort by
Previous:From: Tom LaneDate: 2010-09-13 14:44:48
Subject: Re: Useless sort by

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