Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Who knew a select could deadlock an insert

$
0
0

I guess I'm not the first to see this, mine looked like:

select x.* from keytable k inner join bigtable x on k.akey = x.akey;

--- insert into keytable select distinct akey from #somewhere;

Each statement running in a different spid.

They are fighting over pages in the index of keytable. an indexed heap, fwiw.

Josh


Viewing all articles
Browse latest Browse all 15889

Trending Articles