Re: Running update in chunks?

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Tim Uckun *EXTERN*" <timuckun(at)gmail(dot)com>, Richard Huxton <dev(at)archonet(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)mail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Running update in chunks?
Date: 2013-01-25 11:52:26
Message-ID: A737B7A37273E048B164557ADEF4A58B057A9460@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tim Uckun wrote:
> I dropped the index and the numbers shot up tenfold or more. I don't
> know why postgres feels the need to update the GIN index on the hstore
> field when I am only updating an integer field but it looks like I
> need to split the hstore into a different table.

Every UPDATE that is not HOT will create a row version with
a new "row id". That means that all indexes referencing that
row will have to get updated.

That is consistent with better performance with low fillfactor
(which makes HOT more likely).

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Cowell 2013-01-25 11:57:57 Re: seeking SQL book recommendation
Previous Message Richard Huxton 2013-01-25 11:49:36 Re: Running update in chunks?