将数据从一个表复制到另一个表的最快方法是什么 [英] What is the fastest way to copy data from one table to another
问题描述
我有两张表,一张是Staging
,另一张是Report
.所有的处理都发生在 Staging
中,完成这样的过程后,我必须将所有记录复制到 Report
.
I am having two tables, one is Staging
and another one is Report
. All processing happens in Staging
and upon completion of such process I have to copy all the records to Report
.
Staging
表包含数百万条记录,所以我只想知道将这些数据复制到 Report
的最快方法是什么.
The Staging
table contains millions of records so I just want to know what is the fastest way to copy this data to Report
.
我知道的 3 个选项是:
3 options which I know are:
插入
选择进入
- 创建包并通过作业执行它.
非常感谢这方面的任何帮助.
Any help in this regard is much appreciated.
推荐答案
另一个选项是 BCP out (queryout) 然后 BCP in/BULK INSERT
another option is BCP out (queryout) and then BCP in/BULK INSERT
您也可以在 SSIS 中使用 BULK INSERT 任务
you can also use the BULK INSERT task in SSIS
这篇关于将数据从一个表复制到另一个表的最快方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!