我基本上想要从SQL Server 2005中的一个数据库的表格复制数据到同一SQL Server实例中另一个具有相同结构(但有很多索引)的数据库的表格。
我目前的方法是显而易见的INSERT/SELECT:
set identity_insert TargetDBName.dbo.TableName on
insert into TargetDBName.dbo.TableName ([FieldsList])
select [FieldsList] from TargetDBName.dbo.TableName
set identity_insert SourceDBName.dbo.TableName off
这需要相当长的时间(10百万条记录需要1小时,而从有索引的表到没有索引的表只需要20分钟)。
有什么最好的方法吗?
谢谢!