Skip to content

Instantly share code, notes, and snippets.

@fearlex
Created March 11, 2019 20:25
Show Gist options
  • Save fearlex/280280d23fd77017160cce17d12e305c to your computer and use it in GitHub Desktop.
Save fearlex/280280d23fd77017160cce17d12e305c to your computer and use it in GitHub Desktop.
InnoDB Checks
##-- Show current operations being performed
SHOW FULL PROCESSLIST;
##-- Check InnoDB status for locks
SHOW ENGINE InnoDB STATUS;
##-- Check MySQL open tables
SHOW OPEN TABLES WHERE In_use > 0;
##-- Check pending InnoDB transactions
SELECT * FROM `information_schema`.`innodb_trx` ORDER BY `trx_started`;
##-- Check lock dependency - what blocks what
SELECT * FROM `information_schema`.`innodb_locks`;
##-- See Lock Wait Time Out
show variables like 'innodb_lock_wait_timeout';
show variables like '%wait_timeout%';
##-- See Isolation Levels
show variables like '%tx_isolation%';
SELECT @@GLOBAL.tx_isolation, @@tx_isolation;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment