X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 090DD9DC800 for ; Fri, 10 Feb 2006 18:44:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24469-10 for ; Fri, 10 Feb 2006 18:44:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CB2179DC9E1 for ; Fri, 10 Feb 2006 18:44:07 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1AMi808002865; Fri, 10 Feb 2006 17:44:08 -0500 (EST) To: "Tim Jones" cc: "Dave Dutcher" , pgsql-performance@postgresql.org Subject: Re: joining two tables slow due to sequential scan In-reply-to: <47668A1334CDBF46927C1A0DFEB223D3131317@mail.optiosoftware.com> References: <47668A1334CDBF46927C1A0DFEB223D3131317@mail.optiosoftware.com> Comments: In-reply-to "Tim Jones" message dated "Fri, 10 Feb 2006 17:37:32 -0500" Date: Fri, 10 Feb 2006 17:44:08 -0500 Message-ID: <2864.1139611448@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.109 required=5 tests=[AWL=0.109] X-Spam-Score: 0.109 X-Spam-Level: X-Archive-Number: 200602/122 X-Sequence-Number: 17108 "Tim Jones" 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