From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Michael Mattox <michael(dot)mattox(at)verideon(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Vacuum strategies |
Date: | 2003-05-29 11:27:54 |
Message-ID: | 20030529112754.GE11002@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, May 29, 2003 at 12:21:44 +0200,
Michael Mattox <michael(dot)mattox(at)verideon(dot)com> wrote:
> When I run vacuum (I usually do "vacuum full verbose analyze"), I get a
> message saying vacuum should only be performed when no one is using the
> database. My database is used for a website which is active 24 hours a day,
> so I'm curious what kind of vacuum strategy I should use? Should I shut
> down the website to vacuum or should I just schedule the vacuum to run in
> the middle of the night? So far I've been doing it while the website is
> running without any problems.
Vacuum full exclusively locks tables and can hurt performance if
tables are big. If you are running 7.3, you normally won't need to
run vacuum full. Vacuum should be run when a significant fraction of
rows in a table have been deleted or updated or at least every
10^9 transactions. Analyse needs to be run after inserts, updates
or deletes have significantly impacted the statistics for a table.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert.Farrugia | 2003-05-29 12:24:06 | Re: After VACUUM, statistics become skewed |
Previous Message | pginfo | 2003-05-29 11:25:31 | how to restore corrupted pg? |