mysql notes
# From shell
# From mysql console
show processlist;
show status like '%onn%';
show global status;
show indexes from table;
# profiling
SET profiling = 1;
select ....
show profiles;
# use pt-query
rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
# show indexes that are never used
yum install percona-toolkit
pt-query-digest --explain u=root,p=pass,h=libseat /var/log/mysql_slow.log > report.txt