Last active
September 2, 2022 07:34
-
-
Save jonashaag/54a1cf6c5c5f6bd7f4c87c9ad8260db1 to your computer and use it in GitHub Desktop.
PostgreSQL temporarily disable index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE pg_index | |
SET indisready=false, indisvalid=false | |
WHERE indrelid = (SELECT oid FROM pg_class WHERE relname='<TABLE_NAME>'); | |
... do work ... | |
REINDEX TABLE "<TABLE_NAME>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment