dbTalk Databases Forums  

Which faster: update qry OR DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Which faster: update qry OR DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JonathanK
 
Posts: n/a

Default Which faster: update qry OR DTS - 11-04-2003 , 12:44 PM






I need to import a CSV file, 5 million records, into SQL
server.

I will need to add a new field and then map data into that
field based on an existing field and a small lookup table.

Which is faster??? Get the data into SQL Server and then
running an update query OR doing mapping during DTS import.

This is not the only field I will be mapping.

Many thanks for any replies,

Jonthan K.



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Which faster: update qry OR DTS - 11-04-2003 , 01:04 PM






If you need to do a lookup during the import then for each of those 5
million rows DTS is going to do an extra query (Row * Row). Importing the
file using BULK INSERT and then using a TSQL UPDATE statement doing a joinh
onto the table for the lookup will be far quicker IMHO.



--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"JonathanK" <jonathan.kahn (AT) aig (DOT) zzz.CHANGE.zzz.TO.com.nospam> wrote in
message news:032101c3a303$bfa8b580$a101280a (AT) phx (DOT) gbl...
Quote:
I need to import a CSV file, 5 million records, into SQL
server.

I will need to add a new field and then map data into that
field based on an existing field and a small lookup table.

Which is faster??? Get the data into SQL Server and then
running an update query OR doing mapping during DTS import.

This is not the only field I will be mapping.

Many thanks for any replies,

Jonthan K.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.