Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15264

safe way to do updates

$
0
0

I have a database where many tables have many indexes and as a result different updates can get tangled up and deadlocked.  So here's my question.  Is it guaranteed safe, so that I will get blocking rather than deadlocking, if all updates always specify rows by clustered PK only?

I'm *guessing* it is, but I'd like confirmation, because it is very crufty to go around rewriting to select PK keys into a temp table and then deleting where PK matches the temp table, that comprises worrying about the physical data model when writing logical code.

FWIW I'm still running on various version of SQL 2008 (some R2) Standard 64-bit.

Thanks,

Josh


Viewing all articles
Browse latest Browse all 15264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>