How to check and optimize mysql Performance (1/6) _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Master checks and optimizes mysql Performance (16 ). I have been using the mysql tutorial database tutorial software, which is stable and highly efficient. When encountering severe performance problems, there are usually several possibilities: 1. I have never used the mysql tutorial database tutorial software for indexing, and it works stably and efficiently. There are several possible causes for serious performance problems:

1. The index is not created;
2. SQL statements are too complex;
3. configuration error;
4. the machine cannot be loaded;

1. index not created

If you see that mysql consumes a lot of cpu, you can use the mysql client tool to check.

Run

/Usr/local/mysql/bin/mysql-hlocalhost-uroot-p

Enter the password. if there is no password, you can enter the client interface without the-p parameter.

Check the current running status

Show full processlist

It can be run several times more

This command shows the SQL statement being executed. it informs the executed SQL statement, database name, execution status, client ip address, account used, and running time.

In my cache backend, no SQL statements are displayed most of the time. I think this is normal. If you see a lot of SQL statements, this mysql will certainly have performance problems 1 2 3 4 5 6

Bytes. When encountering severe performance problems, there are generally several possibilities: 1. there is no index...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.