Created
August 26, 2015 04:58
-
-
Save apeckham/ce5c44ad374c34c5f447 to your computer and use it in GitHub Desktop.
big sql update
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
create temporary table u (id int primary key, whatever varchar); | |
\copy u from 'out-file.csv' quote '"' csv | |
# 20 sec | |
update the_actual_table set whatever = u.whatever from u where the_actual_table.id = u.id | |
# 37 minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment