patternsqlMinor
When to run Vacuum Full
Viewed 0 times
fullvacuumrunwhen
Problem
Reading the PostgreSQL documentation there is an excerpt that mentions that you should run a
What percentage of bloat is considered necessary to perform
Still on this question. My rows change frequently, probably affecting my indexes.
Because of this constant change should I also run a
Note:
For performance reasons, usually once a week I run a
table in the database, and after the
table.
Is there anything else I can do?
VACUUM FULL when there are many row lines.What percentage of bloat is considered necessary to perform
VACUUM FULL? SourceStill on this question. My rows change frequently, probably affecting my indexes.
Because of this constant change should I also run a
VACUUM FULL?Note:
For performance reasons, usually once a week I run a
VACUUM for eachtable in the database, and after the
VACUUM I run an ANALYZE for eachtable.
Is there anything else I can do?
Solution
Some cases where I would do VACUUM FULL:
The system is about the run out of disk space and fall over. And that system is dominated by a very bloated table, but without bloated indexes. This should be followed up with some navel gazing about how we get into this mess in the first place.
Or, I fixed what was causing the bloat, now I want to restore the table to a nonbloated state for (hopefully) the last time.
Or, I took over a bloated system, no one from the ancien regime knows why. I want to debloat it and watch it rebloat to make it easier to figure out what is going on.
If you only have bloated indexes, it would be better to REINDEX, not VACUUM FULL. On the most recent versions, this can be done concurrently.
The system is about the run out of disk space and fall over. And that system is dominated by a very bloated table, but without bloated indexes. This should be followed up with some navel gazing about how we get into this mess in the first place.
Or, I fixed what was causing the bloat, now I want to restore the table to a nonbloated state for (hopefully) the last time.
Or, I took over a bloated system, no one from the ancien regime knows why. I want to debloat it and watch it rebloat to make it easier to figure out what is going on.
If you only have bloated indexes, it would be better to REINDEX, not VACUUM FULL. On the most recent versions, this can be done concurrently.
Context
StackExchange Database Administrators Q#302384, answer score: 2
Revisions (0)
No revisions yet.