Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert data into SQL server with best performance

I have an application which intensively uses DB (SQL Server).

As it must have high performance I would like to know the fastest way to insert record into DB.Fastest from the standpoint of execution time.

What should I use ?

As I know the fastest way is to create stored procedure and to call it from code (ADO.NET). Please let me know is there any better way or may be there are is some other practices to increase performance.

like image 616
Incognito Avatar asked May 11 '26 14:05

Incognito


1 Answers

a bulk insert would be the fastest since it is minimally logged, perhaps you can use the SqlBulkCopy class

like image 150
SQLMenace Avatar answered May 13 '26 03:05

SQLMenace



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!