4 ms·
Reindex starts fresh on a temp index and then does a swap in the end - https://www.postgresql.org/docs/current/sql-reindex.html https://www.postgresql.org/docs/
by shayonj 2y ago
Reindex starts fresh on a temp index and then does a swap in the end - https://www.postgresql.org/docs/current/sql-reindex.html https://www.postgresql.org/docs/current/sql-reindex.html
- dogsledsleddog 2y agoThat's very helpful, but I still don't get the recommendation. The reindex seems to guarantee that any useful index will be used, the deletion and recreation seems to guarantee a period of bad performance as long as an index takes to build even if the old one was fine. (I.e. I could imagine a customer upgrading from a version that already backported an index to the new major version where it was added and deciding there's a performance regression.)