I'm running a big transaction on my MySQL database and sometimes it causes deadlocks. I was thinking in running a nested transaction in order to prevent it from happening.
So my question is, if I run a nested transaction, the rows that were locked by this smaller transaction will be "released" as soon as the transaction finish, independently of the outer transaction?
My goal is to release the lock of a table as soon as possible