HIGH Volume MSSQL List Compare

Discussion in 'Databases' started by RedDem0n, Oct 21, 2009.

  1. #1
    Hello folks,

    I have a MSSQL database with about 90,000+ email addresses.

    I have 35,000 email addresses which I have on a text file.

    If I run a query for me to do an export on the database to pull up all 90,000+ email addresses - would it have the potential to crash the server? What would be the safest way to export all the email addresses?

    My goal is to basically be able to compare both lists and remove any matching email addresses from list 2 (35k emails) found on list 1 (90k emails).

    I want to go about with this as safe as possible. Please post your suggestions here. Appreciate it.
     
    Last edited: Oct 21, 2009
    RedDem0n, Oct 21, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    How are you inserting the new records? It may be possible to do a conditional insert so that there are no duplicates. You can also make the email column unique, and then just continue on errors when you insert the new ones. Any dup will throw an error and will not be inserted.
     
    jestep, Oct 21, 2009 IP