SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 fastest way to export an import a table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

alejo46
Posting Yak Master

Colombia
127 Posts

Posted - 10/08/2013 :  21:21:31  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 10/09/2013 :  00:00:53  Show Profile  Reply with Quote
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

Colombia
127 Posts

Posted - 10/11/2013 :  19:34:27  Show Profile  Reply with Quote
openrowset is faster than insert bulk TSQL Command ?

Thanks in advanced
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000