Follow the HSP step-by-step approach to Mysql optimization _mysql

Source: Internet
Author: User
Tags sessions

In the second episode

1.show status like ' com% ' is equivalent to show status sessions like ' com% ' centennial--Displays current console situation

Show global status like ' com% '--shows the number of databases from boot to query

Show sessions status like ' Com_select ';

Show status like ' uptime '--how long has it been started
Show status like ' connections '--Number of connections

Slow_queries the number of slow queries (default is 10)


For MyISAM databases, be cleaned regularly.
Optimize table name, otherwise its delete record is not emptied
Ordering by null disables sorting
Use join instead of subquery
In finance, you can use fixed-point numbers to place data decimal, not to use float, because float loses data. such as float (10,5),
In a date type, use numeric values instead of datastmp


Related Article

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.