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

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 15930

Trending Articles



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