Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 fastest way to export an import a table

Author  Topic 

alejo46
Posting Yak Master

157 Posts

Posted - 2013-10-08 : 21:21:31
good evening, i nned your help

There is a table that contains about 750 millions of records and i would like to know which is the fastest method to export this table using these tools: bcp,a DTS tools,impot and exports wizard ? which one ?

this is the output used in sp:spaceused for the table:

HECHOS_TRAFICO_LLAMADAS_DATOS_SMS_SCL_201303 740933108 200623976 KB 200602496 KB 1128 KB 20352 KB

i would like to export to five different flat text files using the command:

SELECT * FROM HECHOS_TRAFICO_LLAMADAS_DATOS_SMS_SCL_201303 WHERE FEC_PROC >= 20130301 AND FEC_PROC <= 20130305

obviusly i would use the index in the where clause right ?

2.On the other hand which is the fastest part to import a table using those flat text files as sources ?

Id appreciate your help in advanced

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-09 : 00:00:53
bcp would be fastest option

To import to a table you can use OPENROWSET with ot without BULK option.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

alejo46
Posting Yak Master

157 Posts

Posted - 2013-10-11 : 19:34:27
openrowset is faster than insert bulk TSQL Command ?

Thanks in advanced
Go to Top of Page
   

- Advertisement -