Re: Database growing. Need autovacuum help.

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Henrik <henke(at)mac(dot)se>
Cc: "Bill Moran" <wmoran(at)collaborativefusion(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Database growing. Need autovacuum help.
Date: 2008-06-03 14:06:59
Message-ID: dcc563d10806030706g6c583139wf8858dbb8082e425@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 3, 2008 at 7:41 AM, Henrik <henke(at)mac(dot)se> wrote:
>
> To be able to handle versions we always insert new folders even though
> nothing has changed but it seemd like the best way to do it.
>
> E.g
>
> First run:
> tbl_file 500k new files.
> tbl_folder 50k new rows.
> tbl_file_folder 550k new rows.
>
> Second run with no new files.
> tbl_file unchanged.
> tbl_folder 50k new rows
> tbl_file_folder 550k new rows.

On useful trick is to include a where clause that prevents the extra updates.

I.e. update table set field=123 where field <> 123;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2008-06-03 14:39:59 Re: join ... using ... and - is this expected behaviour?
Previous Message Magnus Hagander 2008-06-03 13:47:24 Re: Failing to recover after panic shutdown