From: Ludwik Dylag <ldylag@gmail.com>
To: Leo Mannhart <leo.mannhart@beecom.ch>
Cc: pgsql-performance@postgresql.org
Subject: Re: Massive table (500M rows) update nightmare
Date: Thu, 7 Jan 2010 17:38:26 +0100
Message-ID: <2fe468a21001070838n40f1cbb5y19b34c5c4748a62d@mail.gmail.com> (raw)
In-Reply-To: <4B4601FE.5010300@beecom.ch>
References: <hi41os$eiv$1@news.hub.org>
<4B45DE4C.4050606@beecom.ch>
<4B45A6FE020000250002DEBC@gw.wicourts.gov>
<4B4601FE.5010300@beecom.ch>
I would suggest:
1. turn off autovacuum
1a. ewentually tune db for better performace for this kind of operation
(cant not help here)
2. restart database
3. drop all indexes
4. update
5. vacuum full table
6. create indexes
7. turn on autovacuum
Ludwik
2010/1/7 Leo Mannhart <leo.mannhart@beecom.ch>
> Kevin Grittner wrote:
> > Leo Mannhart <leo.mannhart@beecom.ch> wrote:
> >
> >> You could also try to just update the whole table in one go, it is
> >> probably faster than you expect.
> >
> > That would, of course, bloat the table and indexes horribly. One
> > advantage of the incremental approach is that there is a chance for
> > autovacuum or scheduled vacuums to make space available for re-use
> > by subsequent updates.
> >
> > -Kevin
> >
>
> ouch...
> thanks for correcting this.
> ... and forgive an old man coming from Oracle ;)
>
> Leo
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>
--
Ludwik DylÄ…g
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: ldylag@gmail.com, leo.mannhart@beecom.ch
Subject: Re: Massive table (500M rows) update nightmare
In-Reply-To: <2fe468a21001070838n40f1cbb5y19b34c5c4748a62d@mail.gmail.com>
* 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