From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pallav Kalva <pkalva@deg.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: Poor Performance on a table
Date: Thu, 02 Dec 2004 14:36:59 -0500
Message-ID: <29227.1102016219@sss.pgh.pa.us> (raw)
In-Reply-To: <41AF68F2.1050206@deg.cc>
References: <41AF68F2.1050206@deg.cc>
Pallav Kalva <pkalva@deg.cc> writes:
> I have a table in my production database which has 500k rows and
> from the pg_class it shows the number of "relpages" of
> around 750K for this table, the same table copied to a test database
> shows "relpages" as 35k. I run vacuumdb on the whole
> database (not on the table individually but the whole database) daily.
You're obviously suffering serious table bloat :-(. Depending on how
heavy the update traffic on that table is, it might be that once-a-day
vacuum is simply not often enough. Another likely problem is that you
need to increase the FSM settings (how big is your whole database?)
> Is there any way to fix this problem ?
VACUUM FULL will fix the immediate problem. You might well find CLUSTER
to be a faster alternative, though.
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, pkalva@deg.cc
Subject: Re: Poor Performance on a table
In-Reply-To: <29227.1102016219@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