First of all I like to inform you that I am a new User on Linux administration and I need some help.

I own a CloudLinux web server, and I am faced with a MySQL Slow Queries problem. The problem is that I have several users on my host, that run lot's of slow queries, and this has as a result the MySQL Service termination (I suppose that is termination. In reality, the MySQL server does not respond at all).

The question now is, how can I debug this queries ? I know about the slow queries log file. Already I have see the file, but the content is too hard to get read it. So is there any better way used by Pro ?

Kind regards

3 Answers 3


Use the Percona query digest tool to build summaries of the slow query log. This will help you find the slowest of the slow:


Then use mysql's EXPLAIN command to figure out WHY a particular query is slow:


Hope this helps


If you have trouble understanding the slow queries log file, then you would probably bestto buy professional DBA services to help you resolve the issue.

Generally, a query runs slow if it ties up a lot of resources and there is resource contention on the server, namely CPU, memory and I/O.

Apart from buying a bigger, faster server, indexing tables relevant to your slow queries could be one way to help improve performance. Check out this answer.

You can also enable query caching to help offload the need to repeat really expensive queries.

Anyway, this is just for a start.

-- ab1


EXPLAIN is the most basic way to get information about how the query performs. It is supported by all MySQL versions. Most important you will see how indexes are used.

I use SQLyog for this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .