Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Increase performance of alter tables or any other expensive operations by increasing WORK_MEM parameter for current session in PostgreSQL
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
You can’t perform that action at this time.