Re: [PERFORM] Upgrade to dual processor machine?

From: Neil Conway <neilc(at)samurai(dot)com>
To: "Henrik Steffen" <steffen(at)city-map(dot)de>
Cc: <shridhar_daithankar(at)persistent(dot)co(dot)in>, <pgsql-general(at)postgresql(dot)org>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORM] Upgrade to dual processor machine?
Date: 2002-11-14 21:28:29
Message-ID: 8765uzsuwy.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

"Henrik Steffen" <steffen(at)city-map(dot)de> writes:
> I have many UPDATEs and INSERTs on my log-statistics. For each
> http-request there will be an INSERT into the logfile. And if
> certain customer pages are downloaded there will even be an UPDATE
> in a customer-statistics table causing a hits column to be set to
> hits+1... I didn't think this was a dramatical change so far.

Just to clarify, INSERT does not create dead rows -- tables that have
lots of INSERTS don't need to be vacuumed particularly often. In
contrast, an UPDATE is really a DELETE plus an INSERT, so it *will*
create dead rows.

To get an idea of how many dead tuples there are in a table, try
contrib/pgstattuple (maybe it's only in 7.3's contrib/, not sure).

> Still sure to run VACUUM ANALYZE on these tables so often?

Well, the ANALYZE part is probably rarely needed, as I wouldn't think
the statistical distribution of the data in the table changes very
frequently -- so maybe run a database-wide ANALYZE once per day? But
if a table is updated frequently, VACUUM frequently is definately a
good idea.

Cheers,

Neil

--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2002-11-14 21:34:18 Re: postmaster, but not pg_ctl -i -i
Previous Message jmelesky 2002-11-14 21:26:05 Re: [GENERAL] Upgrade to dual processor machine?

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Treat 2002-11-14 21:29:12 Re: swapping?
Previous Message jmelesky 2002-11-14 21:26:05 Re: [GENERAL] Upgrade to dual processor machine?