what it means for transaction to have high number of lock struct(s)

Hi,

what would be the potential cause(s) for a transaction to have a large number of lock struct(s), (db version is Percona 5.6.25-73.1):


LATEST DETECTED DEADLOCK


*** (2) TRANSACTION:

TRANSACTION 5277811249, ACTIVE 74 sec inserting
mysql tables in use 2, locked 2
3850 lock struct(s), heap size 570920, 102473 row lock(s), undo log entries 102493

it showed that there’re only 2 tables in use, thus trying to see why the lock struct(s) number would be so high…

Thanks,
Bill

InnoDB uses row-level locking and each table can have unlimited number of rows. “102473 row lock(s)” for example, means what 102473 rows locked.

Hi,

thanks for the response. I could understand the row locks part, but was trying to see what could be the reasons for the high lock structs, ‘3850 lock struct(s)’, any idea?

thanks,
Bill