Re: Table UPDATE is too slow - Mailing list pgsql-performance

From Matt Clark
Subject Re: Table UPDATE is too slow
Date
Msg-id 001601c48f8c$b4738700$8300a8c0@solent
Whole thread Raw
In response to Re: Table UPDATE is too slow  (Ron St-Pierre <rstpierre@syscor.com>)
List pgsql-performance
> >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


pgsql-performance by date:

Previous
From: Jean-Max Reymond
Date:
Subject: Optimizing a request
Next
From: "Merlin Moncure"
Date:
Subject: Re: odbc/ado problems