pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rosser Schwarz <rschwarz@totalcardinc.com>
To: pgsql-performance@postgresql.org
Subject: Re: atrocious update performance
Date: Mon, 5 Apr 2004 14:59:32 -0500
Message-ID: <009901c41b48$8357c860$2500fa0a@CardServices.TCI.com> (raw)
In-Reply-To: <40715974.10626.ED9A003@localhost>

while you weren't looking, Kevin Barnard wrote:

> Have you added indexes for the custid column for tables 
> account.acct accunt.orgacct and note?

They were indexed in the original case, yes.  There was no
need to index them in today's test case, as that was done
purely in attempt to rule in or out foreign key validation
as the cause of the performance hit.  No foreign keys that
might be validated, no need to index the foreign key columns.

> I haven't followed the entire thread but it you have 
> cascading FK on those tables without an index on the
> column that could cause your delay.

The issue is that the foreign keys are being validated at
all, when the column being referenced by those foreign keys
(account.cust.custid) is never touched.

Regardless of whether or not the referencing columns are
indexed, validating them at all--in this specific case--is
broken.  The column they refer to is never touched; they
should remain utterly ignorant of whatever happens to other
columns in the same row.

/rls

--
Rosser Schwarz
Total Card, Inc.




view thread (39+ messages)  latest in thread

Message-ID: <009901c41b48$8357c860$2500fa0a@CardServices.TCI.com>
Permalink:  ../009901c41b48$8357c860$2500fa0a@CardServices.TCI.com/
Also on:    postgresql.org/message-id/009901c41b48$8357c860$2500fa0a@CardServices.TCI.com

 · 

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-performance@postgresql.org
  Cc: rschwarz@totalcardinc.com
  Subject: Re: atrocious update performance
  In-Reply-To: <009901c41b48$8357c860$2500fa0a@CardServices.TCI.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