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

From Kevin Grittner
Subject Re: Running update in chunks?
Date
Msg-id 20130123144550.119100@gmx.com
Whole thread Raw
In response to Running update in chunks?  (Tim Uckun <timuckun@gmail.com>)
Responses Re: Running update in chunks?  (Tim Uckun <timuckun@gmail.com>)
Re: Running update in chunks?  (Tim Uckun <timuckun@gmail.com>)
List pgsql-general
Jeff Janes wrote:

> one hstore field can easily be equivalent to 50 text fields with
> an index on each one.
>
> I'm pretty sure that that is your bottleneck.

I agree that seems like the most likely cause. Each update to the
row holding the hstore column requires adding new index entries for
all the hstore elements, and autovacuum will need to clean up the
old ones in the background. The best solution would be to either
normalize the data instead of using hstore, or move the hstore to a
separate table which is referenced by some sort of ID from the
frequently-updated table.

-Kevin


pgsql-general by date:

Previous
From: Gavan Schneider
Date:
Subject: Re: Yet Another Timestamp Question: Time Defaults
Next
From: Ian Harding
Date:
Subject: Trouble with Postgresql RPM