Re: pg_autovacuum vacuum cost variables patch

From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, "pgsql-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_autovacuum vacuum cost variables patch
Date: 2004-10-26 10:52:13
Message-ID: 008901c4bb49$dc515160$ad01a8c0@zaphod
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Matthew T. O'Connor wrote:

> Two questions:
> 1) It is my understanding that these new GUC vars only effect vacuum.
> That is they do NOT have any effect on an analyze command right? (I ask
> since I'm only setting the vars before I issue a vacuum command)

No, vacuum also affects analyze alone (cvs tip here):
(2.5 seconds -> 50 seconds)

test=# SET vacuum_cost_delay TO 0;
SET
Time: 0.308 ms
test=# analyze;
ANALYZE
Time: 2591.259 ms
test=# SET vacuum_cost_delay TO 10;
SET
Time: 0.309 ms
test=# analyze;
ANALYZE
Time: 51737.896 ms

And it seems it affects analyze much more than vacuum, at least if there is
*nothing* to vacuum... (2 seconds -> 8 seconds)

test=# SET vacuum_cost_delay TO 0;
SET
Time: 0.261 ms
test=# VACUUM;
VACUUM
Time: 1973.137 ms
test=# SET vacuum_cost_delay TO 10;
SET
Time: 0.236 ms
test=# vacuum;
VACUUM
Time: 7966.085 ms

I suggest you also issue the SET commands for analyze also. ISTM that there
is also no distinction between VACUUM and VACUUM FULL, but I think
pg_autovacuum never does a vacuum full, so there is no problem with that.

Best Regards,
Michael Paesold

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2004-10-26 12:18:25 Re: [PATCHES] ARC Memory Usage analysis
Previous Message Simon Riggs 2004-10-26 09:50:58 Re: [PATCHES] ARC Memory Usage analysis