Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3D0C737C09D for ; Sun, 28 Sep 2008 06:21:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80526-01-8 for ; Sun, 28 Sep 2008 06:21:05 -0300 (ADT) Received: from mx2.hub.org (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 1565837C70E for ; Sun, 28 Sep 2008 06:20:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gatekeeper.Mib-infotech.co.nz (60-234-154-229.bitstream.orcon.net.nz [60.234.154.229]) by mx2.hub.org (Postfix) with ESMTP id 522861E81781 for ; Sat, 27 Sep 2008 19:34:03 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by gatekeeper.Mib-infotech.co.nz (Postfix) with ESMTP id 776FA10C6EF; Sun, 28 Sep 2008 11:34:01 +1300 (NZDT) X-Virus-Scanned: amavisd-new at mib-infotech.co.nz Received: from gatekeeper.Mib-infotech.co.nz ([127.0.0.1]) by localhost (gatekeeper.mib-infotech.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cGRS2pVCI28Q; Sun, 28 Sep 2008 11:33:57 +1300 (NZDT) Received: from [192.168.95.202] (mr-creosote.mib-infotech.co.nz [192.168.95.202]) by gatekeeper.Mib-infotech.co.nz (Postfix) with ESMTPA id 3127710C6EE; Sun, 28 Sep 2008 11:33:56 +1300 (NZDT) Message-ID: <48DEB4D4.1020100@mib-infotech.co.nz> Date: Sun, 28 Sep 2008 11:33:56 +1300 From: John Huttley User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Scott Marlowe CC: pgsql-performance@postgresql.org Subject: Re: Slow updates, poor IO References: <48DBE587.3050406@mib-infotech.co.nz> <20080926131556.GA1005@commandprompt.com> <48DD6A4A.10209@mib-infotech.co.nz> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060407060708080905000208" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200809/241 X-Sequence-Number: 31554 This is a multi-part message in MIME format. --------------060407060708080905000208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Scott Marlowe wrote: > On Fri, Sep 26, 2008 at 5:03 PM, John Huttley wrote: > >> Hi Andrew, >> There are two problems. >> The first is the that if there is a table with a index and an update is >> performed on a non indexed field, >> the index is still re indexed. >> > > I assume you mean updated, not reindexed, as reindexed has a different > meaning as regards postgresql. Also, this is no longer true as of > version 8.3. If you're updating non-indexed fields a lot and you're > not running 8.3 you are doing yourself a huge disservice. > > Yes sorry, I mean all indexes are updated even when the updated field is not indexed. I'm running 8.3.3 >> this is part of the trade-offs of MVCC. >> > > was... was a part of the trade-offs. > > You are thinking of HOT? I don't think it applies in the case of full table updates?? >> We should reasonably expect that the total amount of IO will go up, over a >> non-indexed table. >> >> The second thing is that the disk IO throughput goes way down. >> >> This is not an issue with MVCC, as such, except that it exposes the effect >> of a write to an indexed field. >> > > It's really an effect of parallel updates / writes / accesses, and is > always an issue for a database running on a poor storage subsystem. A > db with a two drive mirror set is always going to be at a disadvantage > to one running on a dozen or so drives in a RAID-10 > > Oh well, I'm forever going to be disadvantaged. --------------060407060708080905000208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

Scott Marlowe wrote:
On Fri, Sep 26, 2008 at 5:03 PM, John Huttley <John@mib-infotech.co.nz> wrote:
  
Hi Andrew,
There are two problems.
The first is the that if there is a table with a index and an update is
performed on a non indexed field,
the index is still re indexed.
    

I assume you mean updated, not reindexed, as reindexed has a different
meaning as regards postgresql.  Also, this is no longer true as of
version 8.3.  If you're updating non-indexed fields a lot and you're
not running 8.3 you are doing yourself a huge disservice.

  

Yes sorry, I mean all indexes are updated even when the updated field is not indexed.
I'm running 8.3.3

  
this is part of the trade-offs of MVCC.
    

was...  was a part of the trade-offs.

  
You are thinking of HOT?
I don't think it applies in the case of full table updates??


  
We should reasonably expect that the total amount of IO will go up, over a
non-indexed table.

The second thing is that the disk IO throughput goes way down.

This is not an issue with MVCC, as such, except that it exposes the effect
of a write to an indexed field.
    

It's really an effect of parallel updates / writes / accesses, and is
always an issue for a database running on a poor storage subsystem.  A
db with a two drive mirror set is always going to be at a disadvantage
to one running on a dozen or so drives in a RAID-10

  
Oh well, I'm forever going to be disadvantaged.


--------------060407060708080905000208--