I know that this question has been asked in the past but I need to be more specific about the performance of the network.
I need to send from 1 to 100 rows at the same time over the network and I need a specific answer for which method is more suitable in my case. Also which method is more suitable if many clients will run this query at the same time?
The more important thing for my project is the execution speed.
In my results, there was no difference. Α Little more faster was the one insert with multiple values, and the speed of execution was a bit more quickly. But I need to know if there is any trap or something that I need to prevent for these queries.
Thank you in advance.
Example
INSERT INTO Customers (Name, Age, Active) ('Name1',21,1) INSERT INTO Customers (Name, Age, Active) ('Name2',21,1) Vs
INSERT INTO Customers (Name, Age, Active) ('Name1',21,1), ('Name2',21,1) I forgot to mention that they are simple inserts.
insertwould typically be faster than multiple inserts. If these are wrapped in the same transaction, the difference in speed might not be noticeable.