X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1402AD1B502 for ; Mon, 13 Oct 2003 21:55:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 43077-10 for ; Mon, 13 Oct 2003 18:54:44 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 956FDD1B50D for ; Mon, 13 Oct 2003 18:54:42 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9DLsfhn029736; Mon, 13 Oct 2003 17:54:41 -0400 (EDT) To: Mat Cc: pgsql general list Subject: Re: Slow SELECT In-reply-to: <1065641105.4506.10.camel@Arakis> References: <26762.1065199825@sss.pgh.pa.us> <1065641105.4506.10.camel@Arakis> Comments: In-reply-to Mat message dated "08 Oct 2003 20:25:06 +0100" Date: Mon, 13 Oct 2003 17:54:41 -0400 Message-ID: <29735.1066082081@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/625 X-Sequence-Number: 50698 Mat writes: > On Fri, 2003-10-03 at 17:50, Tom Lane wrote: >> Well, it seems to be running at about 5 msec/row, which would be quite >> respectable if each fetch required another disk seek. I'm wondering why >> you are (apparently) not managing to get more than one row per page >> fetched. What are your configuration settings --- particularly >> shared_buffers? Could we see the output of VACUUM VERBOSE for this >> table? > Lines from postgresql.conf that don't start with a '#': > shared_buffers = 126976 #992 MB As someone else pointed out, that is way too large (unless maybe you have 4Gb of RAM, and even then I'd not counsel making shared_buffers that large). > INFO: --Relation public.meta-- > INFO: Pages 685043: Changed 0, Empty 8; Tup 5999170: Vac 0, Keep 0, > UnUsed 5999170. > Total CPU 18.06s/3.61u sec elapsed 612.91 sec. This shows you've got less than 9 tuples per 8k disk page on average. Is the table very wide? If it doesn't seem to you that the tuples should occupy 1K apiece, it might be that you need to run a VACUUM FULL to get rid of some excess free space. (If so, it's a sign that you need to increase the FSM settings in postgresql.conf and/or run plain VACUUM more frequently, so that the free space doesn't get away from you again.) regards, tom lane