I start a transaction.
I read some rows with SELECTs.
Then I do modifications (UPDATE/INSERT/DELETE) related with these rows which I've read.
I commit.
MySQL docs say that it is better to have statements running in the same order to avoid deadlocks. So my question: Should I add ORDER BY to my SELECTs in order to be sure they are always run in the same order, to avoid deadlocks?
I read some rows with SELECTs.
Then I do modifications (UPDATE/INSERT/DELETE) related with these rows which I've read.
I commit.
MySQL docs say that it is better to have statements running in the same order to avoid deadlocks. So my question: Should I add ORDER BY to my SELECTs in order to be sure they are always run in the same order, to avoid deadlocks?