Skip site navigation (1) Skip section navigation (2)

column updates

From: Ben <bench(at)silentmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: column updates
Date: 2004-10-29 19:24:35
Message-ID: Pine.LNX.4.44.0410291215330.3308-100000@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-general
I'm designing a system where I'll be making frequent updates to rows, but
some columns will change far less frequently than others. All columns will 
be read with equal frequency, though probably by means of a materialized 
view. Updates will happen via a stored proc.

Which makes the most sense?

1. Blindly overwrite the value for all columns, even columns that haven't

2. Compare the current value and update each column at a time, leaving 
unchanged columns alone.

3. Break out my tables more, so that infrequently updated columns are in 
different tables. 

I'm thinking that 1 and 2 are similar and less complex than 3, but might 
result in more dead tuples. 2 and 3 will have to look up values before 
updates can happen. I don't know if 2 has any advantage over 1. 1 is 
certainly the simpliest.


pgsql-general by date

Next:From: Sally RuggeroDate: 2004-10-29 19:42:10
Subject: Recommended Procedure for Archiving Table Data
Previous:From: Eric EDate: 2004-10-29 19:20:52
Subject: SELECT a value from various tables depending on a column value

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group