Useful MySQL commands


  • show open TABLES WHERE in_use <> 0 - shows tables in used, eventually locked
  • show processlist - shows all processes including the ones locking tables
  • show full processlist - same as above, but with complete statements
  • kill <pid> - kills a process. Useful for unlocking tables locked by lost processes
  • OPTIMIZE TABLE  tbl_name [, tbl_name] ... - Reorganizes the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing the table.


Comments

Popular posts from this blog

Add GitHub Repository to DBeaver CE Secured with SSH Protocol

Keyboard Shortcut to "Toggle Line Comments" in DBeaver

DBeaver Shortcuts