DB Transactions and locking

Hi all,

When a transaction is executing on a table in my MySQL database is the entire table locked, or just the rows that the transaction updates?

I’m trying to decide whether or not to put an extra layer into my database to handle many concurrent requests to a core table, as locking the entire table will most likely cause an unacceptable performance decrease.

Thanks,

Sean.

If you’re on InnoDB, locking is on row level:

http://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-model.html