X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E9099D1B8EA for ; Fri, 5 Sep 2003 06:45:05 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 05593-01 for ; Fri, 5 Sep 2003 03:44:55 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id ECBF3D1B8E9 for ; Fri, 5 Sep 2003 03:44:52 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h856ipAn009566; Fri, 5 Sep 2003 02:44:51 -0400 (EDT) To: "Bjorn T Johansen" Cc: pgsql-general@postgresql.org Subject: Re: Seq scan of table? In-reply-to: <58940.193.212.14.12.1062742087.squirrel@www.havleik.no> References: <58940.193.212.14.12.1062742087.squirrel@www.havleik.no> Comments: In-reply-to "Bjorn T Johansen" message dated "Fri, 05 Sep 2003 08:08:07 +0200" Date: Fri, 05 Sep 2003 02:44:51 -0400 Message-ID: <9565.1062744291@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/414 X-Sequence-Number: 48636 "Bjorn T Johansen" writes: > I am trying to tune my database and I discovered one select that does a > seq scan on a table but I can't see why... All the join fields are indexed > and I am returning just one record, so no sort is done. > Does it just pick seq scan for the heck of it or is it a reason? Who's to say, when you gave us no details? Show us the table schemas, the exact query, and EXPLAIN ANALYZE output, and you might get useful responses. (btw, pgsql-performance would be a more appropriate list for this issue than pgsql-general.) regards, tom lane