Re: What's faster?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: kbottner(at)comcast(dot)net (Keith Bottner), pgsql-performance(at)postgresql(dot)org
Subject: Re: What's faster?
Date: 2003-12-27 04:00:03
Message-ID: 9344.1072497603@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mike Nolan <nolan(at)gw(dot)tssi(dot)com> writes:
>> 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.

> Unless that field is part of the key, I wouldn't think that a vacuum
> analyze would be needed, as the key distribution isn't changing.

The "analyze" wouldn't matter ... but the "vacuum" would. He needs to
get rid of the dead rows in a timely fashion. The wider the rows, the
more disk space is at stake.

Also, if he has more than just a primary index on the main table,
the cost of updating the secondary indexes must be considered.
A balance-only table would presumably have just one index to update.

Against all this you have to weigh the cost of doing a join to get the
balance, so it's certainly not a no-brainer choice. But I think it's
surely worth considering such a design.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2003-12-27 10:52:07 Re: What's faster?
Previous Message Mike Nolan 2003-12-27 01:06:21 Re: What's faster?