Skip to content

Instantly share code, notes, and snippets.

@mahigupta
Last active August 9, 2019 20:48
Show Gist options
  • Save mahigupta/945903f4adf6eaf4a213cd46e3110525 to your computer and use it in GitHub Desktop.
Save mahigupta/945903f4adf6eaf4a213cd46e3110525 to your computer and use it in GitHub Desktop.
Mysql long running query debugging

to debug long runnign queries in mysql/mariadb

show ENGINE innodb status;
show status like '%';
show processlist;
Show status like "Threads%";
Select substring_index(host, ':', 1as host_name,state,count(*from information_schema.processlist group by state,host_name;
Show global variables like '%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment