Re: DB become enormous with continuos insert and update

From: Vick Khera <vivek(at)khera(dot)org>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: DB become enormous with continuos insert and update
Date: 2010-10-27 20:12:15
Message-ID: AANLkTindZzLnW7cjfQAwziMsyENPcmt8HRX9o1f8Qgfj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 26, 2010 at 5:55 PM, John R Pierce <pierce(at)hogranch(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2010-10-27 20:26:34 Re: How to merge data from two separate databases into one (maybe using xlogs)?
Previous Message Scott Marlowe 2010-10-27 16:25:02 Re: Tracking the # of deadlocks