which one is faster execute reader, scalar, execute non
query ?
Answer Posted / peter
What is faster:
ExecuteNonQuery("INSERT INTO...; INSERT INTO...; INSERT
INTO");
or
ExecuteNonQuery("INSERT INTO...")
ExecuteNonQuery("INSERT INTO...")
ExecuteNonQuery("INSERT INTO...")
I hope you see my point. Of course it is not a matter of
only three inserts, but maybe 200 - and then I would like
to know if I can save time by adding the INSERT-strings to
one big string and only fire off one ExecuteNonQuery.
I was thinking of coding a test to check, but if some of
you have already done this or just know which is faster,
please let me know.
Thanks
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain why it is useful to use mvc instead of webforms? : asp.net mvc
Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?
What is the caspol.exe tool used for?
What is the difference between a default skin and a named skin?
How do we implement bundling in MVC?
Where is cookie used in asp.net?
Why Unload event of MasterPage Calls first in ASP.net ?
What is the use of asp.net web api?
What is session in http request?
Describe the difference between inline and code behind - which is best in?
What’s the difference between asp.net web forms and asp.net mvc?
How do we ensure view state has not tampered?
What are Authentication and Authorization?
What is the difference between c# and .net?
To bind columns manually which tags do you need to add within the asp:datagrid ?