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
Recently, Xiao Ming just bought a new Mac and wan...
This article shares the specific process of the j...
Preface According to the scope of locking, locks ...
How can you find the location of the configuratio...
Table of contents 1. Introduction 2. Solution 2.1...
Table of contents 1. Responsive principle foundat...
Use Javascript to implement a drop-down menu for ...
Back in the Kernel 2.6 era, a new security system...
Anyone who has used Windows Remote Desktop to con...
Use anti-shake to make DIV disappear when the mou...
Table of contents 1. World Map 1. Install openlay...
Table of contents JavaScript function call classi...
Preface Some of the earlier codes on Github may r...
The img tag in XHTML should be written like this:...
This article mainly introduces common strategies ...