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. |