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

SQL Server Update Best Practices

Hi,

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.

Thanks
0
lali_murray
Asked:
lali_murray
1 Solution
 
jogosCommented:
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
0

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