Reindexing

When indexes become less efficient due to being spread over disk inefficiently, either scattered around too randomly or too bloated with now unused values, the index will benefit from being rebuilt. This is most easily done with the REINDEX command, and that can't be done concurrently. More information about detecting when indexes need to be rebuilt and how to do so is in Chapter 7, Routine Maintenance. Remember that the B-tree indices VACUUM and autovacuum always involve a REINDEX operation; this is not true for the other kind of indexes.

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.