From: Laszlo Nagy <gandalf@shopzeus.com>
To: Gregory Williamson <Gregory.Williamson@digitalglobe.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org, Daniel Fekete <danieleff@gmail.com>
Subject: Re: Slow table update - SOLVED!
Date: Mon, 29 Dec 2008 14:11:48 +0100
Message-ID: <4958CC94.6020103@shopzeus.com> (raw)
In-Reply-To: <8B319E5A30FF4A48BE7EEAAF609DB233021F38C2@COMAIL01.digitalglobe.com>
References: <494F749A.5090603@shopzeus.com>
<494F7B48.6070204@shopzeus.com>
<8B319E5A30FF4A48BE7EEAAF609DB233021F389A@COMAIL01.digitalglobe.com>
<494F8DFC.1000001@shopzeus.com>
<7032.1229952622@sss.pgh.pa.us>
<49589BCE.5080201@shopzeus.com>
<8B319E5A30FF4A48BE7EEAAF609DB233021F38C2@COMAIL01.digitalglobe.com>
>
> Inf 8.3 the HOT feature may help if the columns being updated are
> indexed ... what version of PostgreSQL is this again ? (Forgive my
> lack of memory -- the last few days I've forgotten a lot, heh heh.)
>
8.3.5.
The colum that was being updated is part of one small index only.
>
> Any chances to reduce those to a bare minimum, perhaps using
> conditional index strategies or even some form of replication, so the
> primary uses indexes related to the updates and the mirror uses
> indexes related to the read-only / reporting needs ? Perhaps some form
> of staging table with no indexes to load, check data, etc. and then
> insert.
>
> Any way to reduce those ? Check the usage via the system stats on
> table/index use and try removing some and testing to see what makes a
> difference.
>
We tried to remove all indexes on a test system and the update was
speedy. We are going to try to reduce the row size also move static
description/name/textual data into a separate table, and leave
frequently updated data in the original one. We tested this theoretical
version:
Query returned successfully: 182752 rows affected, 56885 ms execution time.
This is much faster. However, this table is used by hundreds of
programs. Anyway, I got the answer to my question.
Thank you!
Laszlo
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: gandalf@shopzeus.com, Gregory.Williamson@digitalglobe.com, tgl@sss.pgh.pa.us, danieleff@gmail.com
Subject: Re: Slow table update - SOLVED!
In-Reply-To: <4958CC94.6020103@shopzeus.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