MySQL optimizer optional switch details

Source: Internet
Author: User
Welcome to the Linux community forum and interact with 2 million technical staff to access MySQL from 5.1 and provide the switch options for optimizer options. In this way, when the optimizer is confused, we can disable something we think should not be done; or when we want to see why the optimizer needs to be selected, We can manually close or press

Welcome to the Linux community forum and interact with 2 million technicians> Start from MySQL 5.1 and provide the switch options for optimizer options. In this way, when the optimizer is confused, we can disable something we think should not be done; or when we want to see why the optimizer needs to be selected, We can manually close or press

Welcome to the Linux community forum and interact with 2 million technicians>

MySQL has provided the optimizer Option Switch option since 5.1. In this way, we can force some things that we think should not be done when the optimizer is confused, or when we want to see why the optimizer is so selective, you can manually disable or enable these options to change the optimization policy.

In MySQL 5.1, the following switch is added:

MySQL 5.5 adds the following switch:

In MySQL 5.6, the following switch is added:

1. mrr

2. batched_key_access

3. block_nested_loop

4. index_condition_pushdown

5. use_index_extensions

6. semijoin

Mysql> select B. class_name from class as B, student as a where. class_id = B. id; + ------------ + | class_name | + ------------ + | xinxi | + ------------ + 2 rows in set (0.00 sec)

7. firstmatch

8. loosescan

9. materialization

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.