Skip to content

Instantly share code, notes, and snippets.

@wkerzendorf
Created January 18, 2012 06:12
Show Gist options
  • Save wkerzendorf/1631397 to your computer and use it in GitHub Desktop.
Save wkerzendorf/1631397 to your computer and use it in GitHub Desktop.
very slow update
lines ~ 200k
levels ~ 20k
update
lines
set
level_id_upper =
(select level_id from levels
where lines.atom=levels.atom and
lines.ion=levels.ion and
lines.e_upper=levels.energy and
lines.g_upper=levels.g and
lines.label_upper=levels.label),
level_id_lower =
(select level_id from levels
where lines.atom=levels.atom and
lines.ion=levels.ion and
lines.e_lower=levels.energy and
lines.g_lower=levels.g and
lines.label_lower=levels.label)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment