Russell Fields
3/22/2007 3:07:00 PM
Roy,
Useful indexes help your complex query to hold fewer locks on the tables,
which it must scan otherwise. They are no guarantee of avoiding deadlocks,
but by reducing locks they narrow the oppotunity for a deadlock.
However, there are many more things to try. In the SQL Books Online, look
for the topic "Minimizing Deadlocks". If you are using SQL 2005 you have
additional options (including TRY ... CATCH) to handle deadlock issues.
RLF
"Roy Goldhammer" <roy@hotmail.com> wrote in message
news:u8l67HJbHHA.1400@TK2MSFTNGP06.phx.gbl...
> Hello there
>
> I've run very complex query on sql server, and in some of the huge tables
> there aren't any indexes, including primary key.
>
> This cause failure of my query on error: Process 81 become deaclock
>
> How missing of indexes could cause deadlock?
>