Last active
November 5, 2018 07:59
-
-
Save ufuk/b8e03cece94101dbe0a6ec8fd4e31cdf to your computer and use it in GitHub Desktop.
Increase performance of alter tables or any other expensive operations by increasing WORK_MEM parameter for current session in PostgreSQL
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
BEGIN; | |
LOCK TABLE ... IN SHARE MODE; | |
SET LOCAL WORK_MEM = '256MB'; | |
ALTER TABLE ...; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment