Home > Net >  The CSV file fast fuzzy query
The CSV file fast fuzzy query

Time:09-21

CSV file has two input, the data is as follows:

Sample CSV file # 1: (50000 records)
=====================
Full_name,
Josh Smith, Google
Mark McCoy, GAP
Brad Gold, Microsoft

Sample CSV file # 2: (up to 1000 records)
=====================
Full_name,
Josh Smith, Google
Mark r. McCoy, GAP
Laura Carter, Trulia
Mr Brad Gold (Sales), Microsoft Corporation
James Wilson, McDonalds

The Output (the only record in CSV1 find CSV2) :
========================
Laura Carter (Laura Carter), LuLiYa
James Wilson (Trulia James Wilson), McDonald's

The great god is there any good way, can the query optimization in a few minutes

CodePudding user response:

Make up is very simple to use linq

CodePudding user response:

reference 1st floor weixin_42150685 response:
use linq or do simple


Speed is too slow,,,,

CodePudding user response:

Article 50000 or 1000 records, and put in the direct cycle search in memory, are almost no delay

CodePudding user response:

So-called CSV is TXT added some thing..

More than 5 w data in the system. IO. Readalllines should read out soon?

Then skip the first line of the skip after the split () ", "after the todict will get a dict Or list T is a class containing a string, the string

Then according to your requirements (if the difference set of 2 to 1)? A word can output the..

This data I don't think in a few minutes... A few seconds in less than estimated.

As for you said linq query is too slow so could you tell me how do you write the code? A look at.

Specific how slow? Can you speak?

CodePudding user response:

It only takes a few minutes? This is too slow, a little scary

CodePudding user response:

The code posted first, look at places can be optimized,
  •  Tags:  
  • C#
  • Related