May 2018
Intermediate to advanced
576 pages
30h 25m
English
PostgreSQL prefers regular maintenance, so please read the recipe that discusses maintenance planning (the one in this chapter).
We recognize that you're here for a reason and are looking for a quick solution to your needs. You're probably thinking—Fix me first, and I'll plan later. So off we go!
PostgreSQL provides a utility command named VACUUM, which is a jokey name for a garbage collector that sweeps up all the bad things and fixes them - or at least, most of them. That's the single most important thing you need to remember to do—I say single, because closely connected to that is the ANALYZE command, which collects optimizer statistics. It's possible to run VACUUM and ANALYZE as a single joint command, VACUUM ANALYZE ...