元ネタ:「SQL Server にデータをインポートするのに最も効率がよい方法は?」
SQL Serverにテキスト形式のデータをインポートするには以下の3つの方法があります。
- インポート・エクスポートウィザードを使う。
- BULK INSERTステートメントを使う。
- BCPコマンドを使う。
どれが最も効率が良いんでしょうねぇ。
ってことでしたが、私もいろいろと調べてみて、以下の情報にぶち当たりました。
「Enhancing DTS Package Performance」
When you are importing text data that does not require transformations and it needs to participate in a process, use the Bulk Insert Task. The Bulk Insert Task is significantly faster than any other task in DTS. When you have minimal transformations, consider BCP or the T-SQL Bulk Insert Statement.
To export data that does not require transformations, use BCP. BCP can be three to six times faster than using DTS.
2001年の記事でSSISがまだない時代の話ですが、これを見る限りどうやらBULK INSERTが一番早くってその次がBCP、DTSはデータ変換などの機能がある分遅いよってことになるかと...
ちょっと環境がなくって、相変わらず実証はできていないのですが...
異論反論ぼしゅーちゅーでっす。
(^O^)/