• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

SQL Server Update Best Practices


I work on a case where a C# application receives Transactions and Transactions lines and then execute an update SP for both Transactions and TransactionLines. No validation are done and all Transaction Lines will be fully updated even if no changes happened. I feel it's not good at all, but C# developpers don't like to test every single fields to check if changes occured and then issue the Update anyways.

I know the answer to this question depends greatly on volume and size of the database and tables and how often you will save an update, but I would like to know general considerations and best practices on this.

1 Solution
Best practice: don't update what isn't changed.
Better practice: don't even try to update what isn't changed
=> eliminates read's and locks

So how do you do it? ex using a kind of modification-flag

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now