June 20, 2013

Post: Innodb undo segment size and transaction isolation

… does transaction isolation affects purging ? Innodb is smart and trying to purge data as soon as possible. In default (REPEATABLE-READ) mode Innodb has to maintain versions back to the first data read the oldest transaction has performed because it is possible for that transaction to require state of any row in Innodb table at that point in time. If you use READ-COMMITTED mode Innodb does…

Post: Ultimate MySQL variable and status reference list

transaction_alloc_block_sizeblogpercona.commanual transaction_isolationblogpercona.commanual transaction

Post: INSERT INTO ... SELECT Performance with Innodb tables.

… slave. If Innodb would not locking rows in source table other transaction could modify the row and commit before transaction which is running… one of INSERT … SELECT you may execute this transaction in READ-COMMITTED isolation mode. Other workarounds are less general purpose. For example…

Post: Innodb Table Locks

… select but add LOCK IN SHARE MODE so it performs locking reads to validate our theory: —TRANSACTION 12305, ACTIVE 9 sec mysql… “IS” mode and there are number of row level locks in “S” mode. What does it mean ? Well we asked Innodb to do…. You almost never will run into problems with Innodb table level locks because innodb will only set intentional level locks for everything…

Post: InnoDB's gap locks

…? Is possible to detect those gap locks using SHOW ENGINE INNODB STATUS: —TRANSACTION 72C, ACTIVE 755 sec 4 lock struct(s), heap…_CLUST_INDEX` of table `test`.`t` trx id 72C lock_mode X locks rec but not gap RECORD LOCKS space id… change during a transaction, so there is no need to create locks to prevent that from happening. 2- innodb_locks_unsafe_for…

Post: When does Innodb Start Transaction ?

… – setting this mode will NOT start transaction however reading or writing Innodb table will. I would call it delayed transaction creation – having transaction open is costly, especially in repeatable-read mode

Post: SELECT LOCK IN SHARE MODE and FOR UPDATE

… SHARE MODE modifiers effectively run in READ-COMMITTED isolation mode even if current isolation mode is REPEATABLE-READ. This is done beause Innodb can… scheduling At this point transaction which made least updates is killed to resolve deadlock. Which means if transaction takes a lot of…

Post: How much memory Innodb locks really take ?

…, query id 24542 localhost root show innodb status Note, running statement in consistent read mode which does not set any locks is… “5%” lock in share mode; +———-+ | count(*) | +———-+ | 102216 | +———-+ 1 row in set (4.44 sec) Looking at SHOW INNODB STATUS we can see: Total number of lock structs in row lock hash table 440 LIST OF TRANSACTIONS FOR EACH SESSION: —TRANSACTION

Post: MVCC: Transaction IDs, Log Sequence numbers and Snapshots

… bit. This is general explanation, it does not corresponds to Innodb in particular and some implementation can be different but I… consider transaction 101 which is running in REPEATABLE-READ isolation mode and which was started before transaction 100 have committed. In such case transaction 101 should not see changes done by transaction 100…

Post: The perils of InnoDB with Debian and startup scripts

… 139 a writer (thread id 1158064464) has reserved it in mode exclusive number of readers 0, waiters flag 1 Last time… 1158064464 which has reserved it. If you hunt through the TRANSACTIONS section, you can see the OS thread IDs, and that… threads: —TRANSACTION 0 228527423, ACTIVE 0 sec, process no 30034, OS thread id 1159956816 starting index read, thread declared inside InnoDB 500…