pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Steben <msteben@autorevenue.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Mass updates on a large table
Date: Fri, 10 Aug 2007 14:20:51 -0400
Message-ID: <11247.1186770051@sss.pgh.pa.us> (raw)
In-Reply-To: <009601c7db75$12876c30$b501a8c0@D1RPQZB1>
References: <009601c7db75$12876c30$b501a8c0@D1RPQZB1>

"Mark Steben" <msteben@autorevenue.com> writes:
> I am attempting an update on two new date field columns on a 17 million row
> table.  Every row gets updated.
> The update statement is a simple one:
>   UPDATE EMAILRCPTS SET ID = ID
>  And the update of the new date fields themselves occurs as the result of a
> before trigger.

When you don't show us the trigger, it's hard to make any useful
comment ... but 60 rows/second seems slow enough to suspect that the
trigger is very inefficient.

> There are about 9 indexes on this table although none of them reference the
> date fields so since there are no inserts I don't think they would have an
> impact on the update  (I've been wrong before though)

And you are again ... but still, it's awfully slow.

> We are at Postgres 7.4.5. 

That's a big problem right there.  One thing I can tell you is that it
is sheer folly to set shared_buffers so high on PG 7.x.  It wasn't till
about 8.1 that we had buffer management algorithms that were good enough
for lots of buffers.  Dial it down to something under 100K buffers.  And
think about an update.  At the very least you should be on a far more
current 7.4.x release.

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <11247.1186770051@sss.pgh.pa.us>
Permalink:  ../11247.1186770051@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11247.1186770051@sss.pgh.pa.us

 · 

reply

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, msteben@autorevenue.com
  Subject: Re: Mass updates on a large table
  In-Reply-To: <11247.1186770051@sss.pgh.pa.us>

* 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