Relational database optimization

Source: Internet
Author: User
Tags mysql client mysql index

1, positioning slow query-find out the execution slow SQL.

2, suitable table structure, appropriate engine, index, partition table, SQL optimization (single machine Optimization).

3, Multi-machine optimization--read/write separation (cluster), distributed.

4, the cache scheme.

Parsing slow query: Explain + SQL statement "using MySQL client"

Indexes are at the expense of insertion, modification, and deletion (because additions and deletions are required to maintain the index). The index is similar to the functionality of a directory.

The MYISAM,INNODB index is based on the binary tree index type. Memory supports hash and two fork trees.

Using an index is to turn the original full table scan into an index lookup.

MySQL index: Normal index (allow duplicates), unique index (mobile phone number, ID card, email), primary key index (cannot be empty), full-text index (only useful for MyISAM)

Relational database optimization

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.