Home > front end >  Article 100000 the data how to quickly inserted into the database and do not repeat
Article 100000 the data how to quickly inserted into the database and do not repeat

Time:09-21


Case:
The database is: SQL server 2008 r2
There is a table, the table name: the userinfo
This table, there is a field: usertel,
Now there are 100000 data, the hope can the fastest, most efficient inserted into the database, and usertel cannot repeat, if and existing database usertel values are the same, do not insert,

CodePudding user response:

Stupid way to read all one hundred thousand data cycle to judge whether to insert 100000 times,
Worry about overtime every time is 1000, refresh 100 times,

CodePudding user response:

Usertel primary key, don't duplicate values directly into it...
  •  Tags:  
  • ASP
  • Related