Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert SP takes Forever
Message
De
25/02/2016 11:17:27
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2008 R2
Divers
Thread ID:
01632022
Message ID:
01632061
Vues:
41
>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform