Re: Postgresqlism & Vacuum? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Postgresqlism & Vacuum?
Date
Msg-id Pine.GSO.4.02A.10004141353070.1442-100000@Panda.DoCS.UU.SE
Whole thread Raw
In response to Postgresqlism & Vacuum?  (Thomas <englim@pc.jaring.my>)
List 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@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Postgresqlism & Vacuum?
Next
From: Frank Bax
Date:
Subject: Re: Postgresqlism & Vacuum?