pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Jones <TJones@optio.com>
Cc: Dave Dutcher <dave@tridecap.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: joining two tables slow due to sequential scan
Date: Fri, 10 Feb 2006 17:44:08 -0500
Message-ID: <2864.1139611448@sss.pgh.pa.us> (raw)
In-Reply-To: <47668A1334CDBF46927C1A0DFEB223D3131317@mail.optiosoftware.com>
References: <47668A1334CDBF46927C1A0DFEB223D3131317@mail.optiosoftware.com>

"Tim Jones" <TJones@optio.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



view thread (14+ messages)  latest in thread

Message-ID: <2864.1139611448@sss.pgh.pa.us>
Permalink:  ../2864.1139611448@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2864.1139611448@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, TJones@optio.com, dave@tridecap.com
  Subject: Re: joining two tables slow due to sequential scan
  In-Reply-To: <2864.1139611448@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox