Re: Delete query not using index and cause deadlock
Rick James Wrote:
-------------------------------------------------------
> Øystein, I do not know if the query engine sorts
> the ids before acquiring row locks. But that
> _might_ be a deadlock-prevention feature.
I do not think query engines sorts to avoid deadlocks, but multi-range read (MRR) and batched key-access (BKA) will imply that keys are sorted before access. However, it will depend on the size of the buffers involved (e.g., join buffer) whether all rows are accessed in a single scan or not.
Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway
Subject
Views
Written By
Posted
8544
August 20, 2015 06:28AM
2966
August 21, 2015 07:13AM
2483
August 22, 2015 03:48PM
2271
August 24, 2015 02:35AM
1941
August 24, 2015 12:27PM
Re: Delete query not using index and cause deadlock
1848
August 25, 2015 02:57AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.