Re: Large Table With Only a Few Rows - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: Large Table With Only a Few Rows
Date
Msg-id 20060301065556.GA1137@wolff.to
Whole thread Raw
In response to Large Table With Only a Few Rows  ("Nik" <XLPizza@gmail.com>)
List pgsql-performance
On Mon, Feb 27, 2006 at 06:48:02 -0800,
  Nik <XLPizza@gmail.com> wrote:
> I have a table that has only a few records in it at the time, and they
> get deleted every few seconds and new records are inserted. Table never
> has more than 5-10 records in it.
>
> However, I noticed a deteriorating performance in deletes and inserts
> on it. So I performed vacuum analyze on it three times (twice in a row,
> and once two days later). In the statistics it says that the table size
> is 863Mb, toast table size is 246Mb, and indexes size is 134Mb, even
> though the table has only 5-10 rows in it it. I was wondering how can I
> reclaim all this space and improve the performance?

You can use VACUUM FULL to recover the space. You should be running normal
VACUUMs on that table every minute or two, not once a day.

pgsql-performance by date:

Previous
From: "Jeevanandam, Kathirvel (IE10)"
Date:
Subject: Re: triggers, performance Was: Re: [GENERAL] rotate records
Next
From: Michael Glaesemann
Date:
Subject: Re: nested query on last n rows of huge table