SETI / rms-opus

PDS OPUS - Outer Planets Data Search Tool
Apache License 2.0
9 stars 7 forks source link

Speed up OPUS import by renaming instead of copying tables #1221

Closed rfrenchseti closed 1 year ago

rfrenchseti commented 2 years ago

After import is finished, the imp_ tables are copied to the permanent tables and then the imp_ tables are dropped. However, if the permanent tables are empty to start with, it would be much, much faster to simply rename the imp_ tables.

rfrenchseti commented 1 year ago

Actually this is much harder than it looks, because foreign keys link the tables and this will get all confused when the tables are being renamed.