Created
April 30, 2012 12:57
-
-
Save th3james/2558102 to your computer and use it in GitHub Desktop.
Postgres != slowness
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
# Crazy Slow | |
UPDATE protected_areas SET criteria = 'Not Applicable' WHERE designation_id != 5; | |
# Near instant | |
UPDATE protected_areas SET criteria = 'Not Applicable' | |
FROM protected_areas AS pa | |
LEFT OUTER JOIN designations ON pa.designation_id = designations.id | |
WHERE designations.id = 5 AND pa.designation_id = NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment