Re: Running update in chunks? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Running update in chunks?
Date
Msg-id 51024EFB.5080805@archonet.com
Whole thread Raw
In response to Re: Running update in chunks?  (Tim Uckun <timuckun@gmail.com>)
Responses Re: Running update in chunks?
List pgsql-general
On 25/01/13 08:57, Tim Uckun wrote:
>> What if you do:
>> alter table cars.imports set (fillfactor=50);
>> Before the vacuum full, and then try the update again?
>
> This makes a dramatic difference when combined with a vacuum.
>
> UPDATE 98834
> Time: 3408.210 ms
>
> Ten times faster!
That suggests (to me, at least) that it is related to index updating.
Again, your GIN index seems primary candidate.

A fillfactor of 50% means row updates probably stay on the same
disk-block as their previous version. This implies less index updates.

Try running iostat (I think that's available on a Mac) with/without the
fillfactor and with/without the GIN index while you do the updates. It's
possible your SSD is just behaving oddly under stress.

--
   Richard Huxton
   Archonet Ltd


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Optimizing select count query which often takes over 10 seconds
Next
From: Anson Abraham
Date:
Subject: Re: main.log file not being updated