Post-load cleanup

Your data is loaded, your indexes recreated, and your constraints active. There are two maintenance chores you should consider before putting the server back into production. The first is a must-do; make sure to run ANALYZE against all the databases. This will make sure you have useful statistics for them before queries start running.

You can also consider running a database-wide VACUUM if you can stand the additional downtime during the load. The reason for this is that it will set the hint bit data for each page of the database, as described later in the Unexplained writes section. You can even combine the two with VACUUM ANALYZE and get everything ready for good initial performance. It's possible to get autovacuum to ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.