Swapping ms-sql tables

前端 未结 6 2047
执笔经年
执笔经年 2021-02-05 08:17

I want to swap to tables in the best possible manner.
I have an IpToCountry table, and I create a new one on a weekly basis according to an external CSV file which I import.

6条回答
  •  伪装坚强ぢ
    2021-02-05 08:59

    Can you not do the import to the one table during off hours?

    Or why not just do a data update, ie update the existing records and add any new ones on a record by record basis as you loop to import the data. This would allow the table to stay live and reduce the overall impact of adding and dropping full tables.

    What is the structure of the data being imported, table design, format, PK, etc? From that we may be able to give you a better answer.

提交回复
热议问题