Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 977989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:59:32+00:00 2026-05-16T03:59:32+00:00

I know its a common question asked several times on SO. But help me

  • 0

I know its a common question asked several times on SO. But help me either way. Actually I have to upload data from my local machine to remote sql database. The remote sql database has a single table where 800,000 records are there. Now from here i have around 1,21311 records locally in my system, from which 75% records already exists on the remote database, but we dont know what records, exactly. We are checking our number using a unique code called DCNNumber. If DCN exists on server then exclude else insert.

So for that what i did is that I collected all DCN from my remote database to a XML using Dataset. The XML alone becomes a 24mb file. From my local text files i am parsing a pulling 1.2 lacs of record to a Generic List. Also the XML DCN are added to a Generic List of String.

Then these two lists are compared using if (! lstODCN.Contains(DCNFromXML)){lstNewDCN.Add(item)};

But this code is taking almost an hour to execute and filter records. So i need some optimal way to filter such a huge figure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:59:33+00:00Added an answer on May 16, 2026 at 3:59 am

    Load all the results into a HashSet<string> – that will be much faster at checking containment.

    It’s possible that LINQ would also make this simpler, but I’m somewhat confused as to exactly what’s going on… I suspect you can just use:

    var newDCNs = xmlDCNs.Except(oldDCNs);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE 10/19/2010 I know I asked this question a while ago, but the workarounds
Very direct question, i need to know if its possible and maybe where to
I know of several functional languages - F#, Lisp and its dialects, R, and
Probably this is a common question. In fact I think I asked it years
I have a question about this question . I posted a reply there but
I'm an IIS guy and know its as simple as just using the http://[computername]/path
Does anyone know if its possible to create a new property on an existing
I want to know if its possible and how to do the following ,
i want to check my server connection to know if its available or not
I know I can figure out the name of the method as its being

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.