Re: joining two tables slow due to sequential scan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tim Jones" <TJones(at)optio(dot)com>
Cc: "Dave Dutcher" <dave(at)tridecap(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: joining two tables slow due to sequential scan
Date: 2006-02-10 22:44:08
Message-ID: 2864.1139611448@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Tim Jones" <TJones(at)optio(dot)com> writes:
> QUERY PLAN
> 'Hash Join (cost=899.83..4384.17 rows=482 width=1350)'
> ' Hash Cond: ("outer".documentidentifier =
> "inner".dssdocumentidentifier)'

This is not EXPLAIN ANALYZE output. Also, the rowcount estimates
seem far enough off in the other query to make me wonder how long
it's been since you ANALYZEd the tables...

More generally, though, I don't see anything particularly wrong
with this query plan. You're selecting enough of the table that
an indexscan isn't necessarily a good plan.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2006-02-10 22:46:14 Re: joining two tables slow due to sequential scan
Previous Message Tim Jones 2006-02-10 22:43:58 Re: joining two tables slow due to sequential scan