pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: D'Arcy J.M. Cain <darcy@druid.net>
To: Keith Bottner <kbottner@comcast.net>
To: pgsql-performance@postgresql.org
Subject: Re: What's faster?
Date: Sat, 27 Dec 2003 05:52:07 -0500
Message-ID: <200312270552.07823.darcy@druid.net> (raw)
In-Reply-To: <008301c3cc0d$f3f337b0$7d00a8c0@juxtapose>
References: <008301c3cc0d$f3f337b0$7d00a8c0@juxtapose>

On December 26, 2003 07:11 pm, Keith Bottner wrote:
> I have a database where the vast majority of information that is related to
> a customer never changes. However, there is a single field (i.e. balance)
> that changes potentially tens to hundreds of times per day per customer
> (customers ranging in the 1000s to 10000s). This information is not
> indexed. Because Postgres requires VACUUM ANALYZE more frequently on
> updated tables, should I break this single field out into its own table,
> and if so what kind of a speed up can I expect to achieve. I would be
> appreciative of any guidance offered.

We went through this recently.  One thing we found that may apply to you is 
how many fields in the client record have a foreign key constraint.  We find 
that tables with lots of FKeys are a lot more intensive on updates.  In our 
case it was another table, think of it as an order or header table with a 
balance, that has over 10 million records.  Sometimes we have 200,000 
transactions a day where we have to check the balance.  We eventually moved 
every field that could possibly be updated on a regular basis out to separate 
tables.  The improvement was dramatic.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



view thread (6+ messages)  latest in thread

Message-ID: <200312270552.07823.darcy@druid.net>
Permalink:  ../200312270552.07823.darcy@druid.net/
Also on:    postgresql.org/message-id/200312270552.07823.darcy@druid.net

 · 

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: darcy@druid.net, kbottner@comcast.net
  Subject: Re: What's faster?
  In-Reply-To: <200312270552.07823.darcy@druid.net>

* 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