I am updating a large table with millions on rows on the primary KEY and it causes transaction lock (Lock wait time exceeded).
The query is an update on the primary key, here is the exact query execute:
UPDATE product p set p.id_image = 12646124 WHERE p.id_product =7835453
Here is the explain statement: https://snag.gy/eEjK5R.jpg
I need to mention i have many indexes in this table, composed indexed most of them, i am using them for filtering and so on, i do not know if this can be the issue, the strange part is that this only happens sometimes, when the ID's are different in the save query, it does not timeout.