In a deadlock, how does DB2 determine which transaction/user/job to terminate? The "word on the street", what I have always heard, is that DB2 abends the user that has done the LEAST amount of work, but I have been unable to verify that in the DB2 manuals. If that assumption is correct, how does DB2 determine the amount of work (GETPAGES, CPU secs, elapsed time, etc....what metric is used?)
According to what I know, the transaction that will abend as a result of a deadlock is the transaction that will take less processing to rollback, so as for your question, less work means less updates.
I think I read this in a redbook called, application design for high performance.
In DB2 for LUW, to what I read, DB2 deadlock detector will arbitrarily select one of the participating deadlocked processes, and will then be the victim process to rollback.
Tags
Use the search field to
find all types of content in My developerWorks with that tag.
Use the slider bar to see more or fewer tags.
Popular tags shows the top tags for this particular type of content or application that you're viewing.
My tags shows your tags for this particular type of content or application that
you're viewing.