Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2012
>>Our scenario was different in that we were doing mostly inserts and deletes. If your job is truly unique updates, I'm not sure how to implement that as a batch process. Could you create datatables or Temp tables of your modified data, then use MERGE to update the target tables?
>
>The closest thing I have found would have been to create a temporary table with all the fields. Then, the unchanged fields would simply have had their values to remain while the updated ones would have the new values. Then, an overall replace of all fields would only apply.
>
>But, as this would have been on all the fields, I am not sure this would have been faster.
If there is a way for you to easily test this approach, I would try it. Set based updates can be vastly quicker.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement