-
+
Routine Database Maintenance Tasks
- Recommended practice for most sites is to schedule a database-wide
- ANALYZE> once a day at a low-usage time of day; this can
- usefully be combined with a nightly VACUUM>. However,
- sites with relatively slowly changing table statistics might find that
- this is overkill, and that less-frequent ANALYZE> runs
- are sufficient.
+ Fortunately, autovacuum () monitors table
+ activity and performs ANALYZEs when necessary. This
+ eliminates the need for administrators to manually schedule
+ ANALYZE.
+
+
+ For those not using autovacuum, one approach is to schedule a
+ database-wide ANALYZE> once a day at a low-usage time of
+ day; this can usefully be combined with a nightly VACUUM>.
+ However, sites with relatively slowly changing table statistics might
+ find that this is overkill, and that less-frequent ANALYZE>
+ runs are sufficient.