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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

alejo46
Posting Yak Master

Colombia
157 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
52326 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
157 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  
 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.06 seconds. Powered By: Snitz Forums 2000