Re: DB become enormous with continuos insert and update - Mailing list pgsql-general

From Vick Khera
Subject Re: DB become enormous with continuos insert and update
Date
Msg-id AANLkTindZzLnW7cjfQAwziMsyENPcmt8HRX9o1f8Qgfj@mail.gmail.com
Whole thread Raw
In response to Re: DB become enormous with continuos insert and update  (John R Pierce <pierce@hogranch.com>)
Responses Re: DB become enormous with continuos insert and update  (Hfe80 <federico.mo@gmail.com>)
List pgsql-general
On Tue, Oct 26, 2010 at 5:55 PM, John R Pierce <pierce@hogranch.com> wrote:
> never do VACUUM FULL.   Rather, use CLUSTER to rebuild heavily used tables
> in order of the most frequently used key (typically the PK), however this
> requires a global table lock for the duration, so should only be used when
> your application is relatively inactive.

Another trick I like to use is to alter a table field from type
integer to type integer.  This causes pg to rewrite the table without
trying to do any sorting that cluster would imply, and results in
basically the same end result, and is MVCC safe to boot.

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Tracking the # of deadlocks
Next
From: Vick Khera
Date:
Subject: Re: How to merge data from two separate databases into one (maybe using xlogs)?