To find out slow queries running for mysql Εκτύπωση

  • 526

Sometimes php applications are not tuned up properly. In that case we can track the mysql queries running at very slow speed.

To do this

 

Edit /etc/init.d/mysql

$bindir/mysqld_safe –datadir=$datadir –pid-file=$pid_file >/dev/null 2>&1 &

Add –log-slow-queries=/var/log/slow-queries.log to above line as below.

$bindir/mysqld_safe –datadir=$datadir –pid-file=$pid_file –log-slow-queries=/var/log/slow-queries.log
>/dev/null 2>&1 &


Η απάντηση ήταν κατατοπιστική?

« Πίσω