Conversation
Notices
-
Tuesday, 10-Feb-15 12:11:06 UTC from web
-
-
Other way to analyze slow queries is to enable enble slow query log from /etc/mysql/my.cnf add to config: slow-query-log = 1 slow-query-log-file = /var/log/mysql/mysql-slow.log long_query_time = 1 log-queries-not-using-indexes And then use mysqldumpslow command to analyze the log
-
To add INDEX to a TABLE COLUMN use query: ALTER TABLE TABLE_NAME ADD INDEX (COLUMN_NAME);
-
A very good article on how to diagnose a slow query is here - http://s.pc-freak.net/url/295
-