From: Matt Clark <matt@ymogen.net>
To: 'Ron St-Pierre' <rstpierre@syscor.com>
To: 'Steinar H. Gunderson' <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: Table UPDATE is too slow
Date: Tue, 31 Aug 2004 19:59:55 +0100
Message-ID: <001601c48f8c$b4738700$8300a8c0@solent> (raw)
In-Reply-To: <4134C4FA.20404@syscor.com>
> >That looks like poor database normalization, really. Are you
> sure you
> >don't want to split this into multiple tables instead of having 62
> >columns?
> >
> No, it is properly normalized. The data in this table is stock
> fundamentals, stuff like 52 week high, ex-dividend date, etc, etc.
Hmm, the two examples you gave there are actually ripe for breaking out into
another table. It's not quite 'normalisation', but if you have data that
changes very rarely, why not group it into a separate table? You could have
the highly volatile data in one table, the semi-volatile stuff in another,
and the pretty static stuff in a third. Looked at another way, if you have
sets of fields that tend to change together, group them into tables
together. That way you will radically reduce the number of indexes that are
affected by each update.
But as someone else pointed out, you should at the very least wrap your
updates in a big transaction.
M
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: matt@ymogen.net, rstpierre@syscor.com, sgunderson@bigfoot.com
Subject: Re: Table UPDATE is too slow
In-Reply-To: <001601c48f8c$b4738700$8300a8c0@solent>
* 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