Re: Postgresqlism & Vacuum?

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: Thomas <englim(at)pc(dot)jaring(dot)my>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresqlism & Vacuum?
Date: 2000-04-14 11:59:05
Message-ID: Pine.GSO.4.02A.10004141353070.1442-100000@Panda.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 14 Apr 2000, Thomas wrote:

> I think there must be something wrong with the optimiser that it's
> "postgresqlism" that you must vacuum analyze frequently.

One thing that is not widely known is that vacuum actually has two
orthogonal tasks: garbage collection and statistics collection (only when
you ANALYZE). The fact that this is combined in one command is a
historical artifact, and there are some voices that want to separate the
commands.

The way I see it, if you have enough disk space you never have to run
vacuum to garbage collect. It might lead to obvious problems when the heap
files get so large that it takes more time to physically access them. The
alternative is to garbage collect on each transaction commit but that
bears its own set of performance implications.

The analyze part would probably not need an exclusive lock on the table
but the vacuum certainly does.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank Bax 2000-04-14 14:47:18 Re: Postgresqlism & Vacuum?
Previous Message Colin Smith 2000-04-14 11:51:07 Re: [Fwd: [HACKERS] Porting reports (cont'd)]