3 ms·
Hi! There are some good suggestions in this thread already. Step #1 is to determine why it is slow. If it is slow under load, then I am going to suspect that
by morgo 13y ago
Hi!
There are some good suggestions in this thread already. Step #1 is to determine why it is slow.
If it is slow under load, then I am going to suspect that you are hitting table locks - which means you need to migrate to InnoDB (row locking + MVCC). Important to point out: a bigger server may not actually help enough here, because while you are waiting on locks nothing can be done while there is free capacity waiting to be used.
If it is just generally slow related to growth, it can probably be improved by indexing - which will help you reduce what data needs to be in RAM.
In either case, two third party tools to suggest:
- pt-query-digest: aggregate your slow query log. You want to use 0 seconds as the threshold, record 20 minutes of slow queries during regular activity. Methodology described here: http://gtowey.blogspot.ca/2012/07/slow-query-log-is-not.html http://gtowey.blogspot.ca/2012/07/slow-query-log-is-not.html
- pt-online-schema-change: you can migrate from MyISAM to InnoDB online via triggers (not online by default).
Both tools part of http://www.percona.com/software/percona-toolkit http://www.percona.com/software/percona-toolkit
- webvet 13y agoWe did use a tool (perl script) called mysqltuner.pl on this sometime last year and it did give us some useful/actionable insight. Will check out what you've suggested too. Thanks. :)