X-Original-To: pgsql-performance@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id CCCBB926035 for ; Sat, 31 May 2003 14:02:46 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 12824-10 for ; Sat, 31 May 2003 14:02:36 -0400 (EDT) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by developer.postgresql.org (Postfix) with ESMTP id 1B157926020 for ; Sat, 31 May 2003 14:02:36 -0400 (EDT) Received: from [10.1.2.130] (helo=dba2) by mail.libertyrms.com with esmtp (Exim 3.22 #3 (Debian)) id 19MAgd-0002tb-00 for ; Sat, 31 May 2003 14:02:35 -0400 Received: by dba2 (Postfix, from userid 1019) id 756E0D1BB; Sat, 31 May 2003 14:02:35 -0400 (EDT) Date: Sat, 31 May 2003 14:02:35 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: why Sequencial Scan when selecting on primary key of table? Message-ID: <20030531180235.GF22469@libertyrms.info> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org References: <21073.1054401227@sss.pgh.pa.us> <000001c3279c$79dc2d80$01000001@trouble> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001c3279c$79dc2d80$01000001@trouble> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/303 X-Sequence-Number: 2082 On Sat, May 31, 2003 at 01:45:50PM -0400, Brian Tarbox wrote: > The primary key field is an integer and I have performed vacuum analyse but > that does not seem to change anything. int4? int8? int2? Makes a difference. Please post the results of EXPLAIN ANALYSE on the query you're having trouble with, and someone may be able to help you. (You'll need to show us the table, too.) > I've also heard that postgres will not indexes when JOINing tables. Can > that really be true?? No. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada M2P 2A8 +1 416 646 3304 x110