Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert SP takes Forever
Message
From
25/02/2016 11:17:27
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2008 R2
Miscellaneous
Thread ID:
01632022
Message ID:
01632061
Views:
42
>>>Thanks, why would a stored procedure be a bad idea for inserting one record? I had learnt this technique from Kevin McNeish (sp?) in Mere Mortals for .Net so thought it would be a good practice that all updates go through a stored procedure.
>>>
>>
>>I think the question was whether this procedure was being used inside of some loop or other looping construct to insert a large number of rows in one shot, one row at a time.
>>
>>If that was the case, it's better to send in XML or a table type (new in SQL 2008).
>
>Or just use BULK INSERT.

That's true, if the conditions are such that BULK INSERT would be an option, it's definitely going to be faster.
Previous
Reply
Map
View

Click here to load this message in the networking platform