February 8, 2012 at 7:02 am
I had to do a little research. I definitely learned something useful. Thanks
February 8, 2012 at 7:17 am
Great Question. That one took me back a ways in the memory banks. I thought I remembered, and I remembered right.:-)
February 8, 2012 at 7:58 am
Daniel Bowlin (2/8/2012)
I had to do a little research. I definitely learned something useful. Thanks
Same here, so good question. Thanks.
February 8, 2012 at 8:57 am
tks for the question
February 8, 2012 at 9:31 am
Great question. Wasn't very familiar with this, and I think it will help me solve a nagging problem we've been having....
Rob Schripsema
Propack, Inc.
February 8, 2012 at 11:22 am
Thanks for the question
February 8, 2012 at 12:53 pm
Good question, thanks.
February 8, 2012 at 6:20 pm
jts_2003 (2/8/2012)
Daniel Bowlin (2/8/2012)
I had to do a little research. I definitely learned something useful. ThanksSame here, so good question. Thanks.
+1 Still no sure to understand it perfectly, but ya... thanks!
February 9, 2012 at 3:07 am
Thanks for the nice question.
I wonder what SQL Server does about victim selection when all processes involved have the same deadlock priority (which will be most of the time, I imagine).
Tom
February 9, 2012 at 9:42 am
This was a simple one - thanks!
February 11, 2012 at 7:20 am
Good question. Thanks for submitting.
http://brittcluff.blogspot.com/
February 13, 2012 at 4:04 am
L' Eomot Inversé (2/9/2012)
I wonder what SQL Server does about victim selection when all processes involved have the same deadlock priority (which will be most of the time, I imagine).
It estimates which of the processes will be less expensive to roll back and selects that one as the victim (it's explained in the first bullet point in the MSDN article linked in the answer). 🙂
February 13, 2012 at 11:17 am
Simon Liddle (2/13/2012)
L' Eomot Inversé (2/9/2012)
I wonder what SQL Server does about victim selection when all processes involved have the same deadlock priority (which will be most of the time, I imagine).It estimates which of the processes will be less expensive to roll back and selects that one as the victim (it's explained in the first bullet point in the MSDN article linked in the answer). 🙂
But that's a pretty content-free explanation! 🙁
Everyone :crazy: knows that the idea is to minimise cost, and that most :unsure: systems make some sort of stab at doing that ("everybody"?? and most ??? that's me being disgustingly optimistic again, twice in one sentence :hehe:).
The question is what that estimate of cost is based on. One popular way of estimating is to look at which transaction in the loop was the last to start; another is to select the last to tale a lock, which may not be equivalent; yet another the last to take a lock that it still holds, which in several of MS's isolation levels is yet a third story; yet another variation is to hand each process a token when it starts a transaction, and invalidate the token when the transaction is committed or is rolled back for any reason other than as a deadlock victim, and provide a transaction start-again command which takes a token as a parameter, and then victimise the one with the newest token; that last has a variant in which a token is also invalidated if too much time passes during which it doesn't belong to a transaction; then there are bvariants based on how much IO the transaction has already used, or how much mill, or how much main-store occupancy, or some waited combination of these three, or that combined with infomation about start (whether lock related or tokenised or not). All those algorithms were in use or at least in the literatuire when I was working on deadlock detection a couple of decades ago, and I imagine thiongs have moved on now. It would be nice to know what algorithm (or at least what class of algorithm) MS uses, and the article referenced says precisely nothing :angry:, zilch, or squat about that. Too difficult for their customers, a question like that, I guess.
Tom
February 13, 2012 at 11:23 am
L' Eomot Inversé (2/13/2012)
But that's a pretty content-free explanation!
My recollection is that it is the process that has generated least log that is selected as the victim.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
February 13, 2012 at 1:05 pm
SQL Kiwi (2/13/2012)
L' Eomot Inversé (2/13/2012)
But that's a pretty content-free explanation!My recollection is that it is the process that has generated least log that is selected as the victim.
Thanks Paul. Actually that looks like a pretty good choice - reassuring.
Tom
Viewing 15 posts - 16 through 29 (of 29 total)
You must be logged in to reply to this topic. Login to reply