Which SQL query takes longer? (MYSQL)

How to check which sql query takes longer? (MYSQL) I use a dedicated Linux server and the website consumes 1 GB of RAM, the company says due to SQL queries (MYSQL). Can someone tell me how to check which sql queries take longer and use more resources?

+5
source share
4 answers

You can use the Mysql Slow Query Log .

+4
source

Mysql provides the EXPLAIN keyword to display the query execution plan; just put "EXPLAIN" in front of your query, and Mysql will display the execution plan for that query.

http://dev.mysql.com/doc/refman/5.0/en/explain.html

+2

EXPLAIN, , . MySQL , .

0

MySQL, , MySQL , MySQL. , MySQL, my.cnf. MySQL - . , . .

0

All Articles