Deadlocking

You may avoid deadlocking if applications accessing SQL Server are built so that transactions access tables in the same chronological order across all user transactions. You should explain the concept of chronological table access to SQL Server application developers as early as possible during the application design process to avoid deadlocking problems, which are expensive to solve later.

By reducing SQL Server query I/O and shortening transaction time you can help prevent deadlocking. This can make queries faster, ensure lock resources are held for a shorter period, and reduce all locking contention (including deadlocking). Use the SQL Server Query Analyzer Show stats I/O option to determine the number of logical page fetches associated with large queries. Use the SQL Server Query Analyzer Show query plan option to review index use, and then consider a SQL Server query redesign that is more efficient and uses less I/O.

For more information, see SQL Server Books Online.