From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mat <psql-mail@freeuk.com>
Cc: pgsql general list <pgsql-general@postgresql.org>
Subject: Re: Slow SELECT
Date: Mon, 13 Oct 2003 17:54:41 -0400
Message-ID: <29735.1066082081@sss.pgh.pa.us> (raw)
In-Reply-To: <1065641105.4506.10.camel@Arakis>
References: <E1A50Io-000KGI-Lc@buckaroo.freeuk.net>
<26762.1065199825@sss.pgh.pa.us>
<1065641105.4506.10.camel@Arakis>
Mat <psql-mail@freeuk.com> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, psql-mail@freeuk.com
Subject: Re: Slow SELECT
In-Reply-To: <29735.1066082081@sss.pgh.pa.us>
References: <E1A50Io-000KGI-Lc@buckaroo.freeuk.net> <26762.1065199825@sss.pgh.pa.us> <1065641105.4506.10.camel@Arakis> <29735.1066082081@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