MySQL study note 8

Source: Internet
Author: User

    Show status like 'value'; query the performance of the MySQL database.
    Value Parameter
    • Connections: Number of times the MySQL server is connected
    • Uptime: MySQL Server launch time
    • Slow_queries: Number of slow queries
    • Com_lelect: number of queries
    • Com_insert: Number of insert operations
    • Com_delete: Number of delete operations
  1. Query the connection times of the MySQL server: show status like 'connections ';
  2. Optimize Query
  3. Index impact on query speed
  4. Use index Query
  • Optimize database structure
  • Analysis table
    Basic Syntax: analyze table name 1 [TABLE name 2...];
  • Checklist
    Basic Syntax: check table name 1 [, TABLE name 2] [option]
    Check whether errors exist in tables of the InnoDB and MyISAM types. In addition, this statement can also check whether errors exist in views.
  • Optimization table
    Use the optimize table statement in MySQL to OPTIMIZE the TABLE. Basic Syntax: optimize tables table Name 1 [TABLE name 2...];
    The optimize table statement can be used to eliminate disk fragments caused by deletion and update, thus reducing the waste of space. This statement also adds a read-only lock to the table during execution.
  • Query high-speed cache
  • Optimize multi-table queries
  • Optimize Table Design
  • 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.