title: How do I perform lookup while importing a large dataset using SSIS package?
body: <p>I have a problem - I wish to dowload customer data via SSIS (Microsoft ETL). For each customer record I import, I have to check against existing customer records in my target DB. If the record exists, I have to UPDATE the record, and if it doesn't I have to INSERT it. What is the strategy for the best performance? We're talking 20-30 million rows. </p>
  
  <p>I thought of triggers (trigger on INSERT - check for existence of record), lookup, cursors, but I'm sure there's a better way, probably using one of the Data Flow Transformations in SSIS?</p>
  
  <p>Or is it better I import this to a staging table and then do the lookup locally?</p>