阅读背景:

插入一个大表,其中PK不是一个身份

来源:互联网 

I am importing data from an old DB into a new one. One of the tables has over 30 million rows, I have to obtain the same PK values from the OLD DB. After the migration, I have to develop stored procedures for inserting data into that table. My question is: should I set the PK (after migration) to be an Identity or when I insert data, find the Max value for PK and increment it by 1, then insert? If I should use the first approach, how can I? I tried doing it via Management Studio, but it always fails due to a time out exception. In case I should use the second approach, is it thread safe and does it decrease the performance?I am importing data from an old DB into a new o




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: