Preface MRR is the abbreviation of Multi-Range Read, which aims to reduce random disk access and convert random access into more sequential access. Applicable to range/ref/eq_ref type queries. Implementation principle: 1. After searching the secondary index, find the required data based on the obtained primary key in the clustered index. 2. The order of the primary keys obtained by secondary index search is uncertain, because the order of the secondary index is not necessarily consistent with the order of the clustered index; 3. If there is no MRR, data pages may be read out of order during clustered index lookup, which is extremely unfriendly to mechanical hard drives. 4. MRR optimization methods:
5. When the optimizer uses MRR, “Using MRR” will appear in the Extra column of the execution plan. 6. If the order of the secondary index used in the query is consistent with the order of the result set, then the result set needs to be sorted after using MRR. Using MRR can also reduce the number of times pages in the buffer pool are replaced and batch process key value query operations. You can use the command index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=off,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,use_invisible_indexes=off,skip_scan=on Use Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of React event binding
This may be an issue that is easily overlooked. F...
Preface Relational databases are more likely to b...
Copy code The code is as follows: <html> &l...
What products do you want to mention? Recently, t...
This article shares the specific code for JavaScr...
In general guestbooks, forums and other places, t...
In actual project development, if we have a lot o...
Author: Guan Changlong is a DBA in the Delivery S...
Preface Those who have played with MySQL must be ...
The effect achievedImplementation Code html <d...
Suppose Taobao encourages people to shop during D...
There are many tools, components and programs for...
background: In MySQL, if there is a limited level...
introduction: Nowadays, many dynamic verification...
chmod Command Syntax This is the correct syntax w...