MySQL Forums
Forum List  »  Performance

Re: MySQL 5.7 : InnoDB. 2 Deletes query using index but... too many rows locked and cause deadlock
Posted by: Christine Antoine
Date: July 18, 2019 04:29AM

Olivier,

How can I force the index on a delete ?
I try to find the right syntax but it's not working...
I tried, the "FORCE" or the IGNORE INDEX(PRIMARY) but it fails..

This one is working :
DELETE t1 FROM cid_operation t1 FORCE INDEX (FK_CID_OPERATION_ENV_CASE)
JOIN cid_operation t2 USING (id_env_case)
WHERE (t2.id_env_case = 4448) AND (t2.id BETWEEN 15006449 AND 15007342)

But I'm really not sure of the impacts

Options: ReplyQuote




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.