Re: Running update in chunks?

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)mail(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Running update in chunks?
Date: 2013-01-21 23:36:10
Message-ID: CAGuHJrMrnQepca47jWhj+COStJcs2EmQBoA3Q+Koyh_0C=antA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> First off, what does it say for rows affected? (Hint, if you really
> are using a default configuration and it doesn't say 0 rows
> affected, please show us the actual query used.)

update imports set make_id = null

Query returned successfully: 98834 rows affected, 49673 ms execution time.

vacuum analyze imports

Query returned successfully with no result in 4138 ms.

VACUUM FULL imports;

Query returned successfully with no result in 38106 ms.

VACUUM FREEZE ANALYZE;

Query returned successfully with no result in 184635 ms

update imports set make_id = 0

Query returned successfully: 98834 rows affected, 45860 ms execution time.

So all the vacuuming saved about four seconds of execution time.

here is the postgresql.conf completely untouched from the default
install https://gist.github.com/4590590

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2013-01-21 23:45:25 Re: Running update in chunks?
Previous Message Gavan Schneider 2013-01-21 22:48:34 Re: Yet Another Timestamp Question: Time Defaults