简体   繁体   中英

ETL Strategies: Identity Insert vs. Use Identity Logic

One of my ETL moves about 18 Million rows from one server to another for further processing. I am using the FAST LOAD option.

For the Identity Column, I have two options:

  • Use IDENTITY INSERT
  • Don't set any input for the Identity Column, thereby forcing SQL Server to generate a new IDENTITY for each row inserted

The value of the Identity column does not matter.

Which option should I choose for the best performance?

Based on what you've told us, the value of the identity column doesn't matter and you have no reason for it to agree with the original table's value, I would choose the second option. There you are using SQL Server's natural method of setting identity values, you eliminate gaps in the values and the key will be ascending based on the order you choose when you insert them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM