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 could 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 chew away on that problem instead, but it will considerably slow the database until that's finished every table. Another potential improvement recommended here is making this wide VACUUM
more aggressive about freezing old transactions...