Thread: [PERFORM] vacuum analyze affecting query performance

[PERFORM] vacuum analyze affecting query performance

From
rverghese
Date:
We are on Postgres 9.5, and have been running a daily vacuum analyze on the
entire database since 8.2
The data has grown exponentially since, and we are seeing that queries are
now being significantly affected while the vacuum analyze runs. The query
database is a Slony slave.
So the question is, is this typical behavior and should we still be running
a daily vacuum analyze on the database?

Thanks!
RV



--
View this message in context:
http://www.postgresql-archive.org/vacuum-analyze-affecting-query-performance-tp5970681.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


Re: [PERFORM] vacuum analyze affecting query performance

From
Albe Laurenz
Date:
rverghese wrote:
> We are on Postgres 9.5, and have been running a daily vacuum analyze on the
> entire database since 8.2
> The data has grown exponentially since, and we are seeing that queries are
> now being significantly affected while the vacuum analyze runs. The query
> database is a Slony slave.
> So the question is, is this typical behavior and should we still be running
> a daily vacuum analyze on the database?

While VACUUM runs on tables, you can expect performance to get worse,
mostly because of contention for I/O resources (is that the case for you?).

Autovacuum has become *much* better since PostgreSQL 8.2.

If you cannot find a "quiet time" during which you can keep running your
daily VACUUM without causing problems, don't do it and go with autovacuum
by all means.

Autovacuum is less disruptive than normal VACUUM, it is designed to not
hog resources.

If the database is very busy and autovacuum has problems keeping up,
tune it to be more aggressive (and it will still be less disruptive
than a manual VACUUM).

Yours,
Laurenz Albe

Re: [PERFORM] vacuum analyze affecting query performance

From
rverghese
Date:
Thanks for the info!



--
View this message in context:
http://www.postgresql-archive.org/vacuum-analyze-affecting-query-performance-tp5970681p5970830.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.