content_image/796370.jpg
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 

<img src='content_image/796370.jpg'>

## Note 

A MERGE_THRESHOLD  value defined at the index level takes priority over a MERGE_THRESHOLD  value defined for the table. If undefined, MERGE_THRESHOLD defaults to 50% ( MERGE_THRESHOLD=50 , which is the previously hardcoded value. 

Likewise, you can use SHOW INDEX  to view the MERGE_THRESHOLD  value for an index, if explicitly defined using the index_option COMMENT  clause: 

## Measuring the Effect of MERGE_THRESHOLD Settings 

mysql> SHOW INDEX FROM t2 \G *************************** 1. row *************************** Table: t2 Non_unique: 1 Key_name: id_index  Seq_in_index: 1 Column_name: id Collation: A Cardinality: 0 Sub_part: NULL Packed: NULL Null: YES Index_type: BTREE Comment: Index_comment: MERGE_THRESHOLD=40 

The INNODB_METRICS  table provides two counters that can be used to measure the effect of a MERGE_THRESHOLD  setting on index page merges. 

mysql> SELECT NAME, COMMENT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME like ’%index_page_merge%’; +-----------------------------+----------------------------------------+ | NAME | COMMENT | +-----------------------------+----------------------------------------+ | index_page_merge_attempts | Number of index page merge attempts | | index_page_merge_successful | Number of successful index page merges | +-----------------------------+----------------------------------------+ 

When lowering the MERGE_THRESHOLD  value, the objectives are: 

•A smaller number of page merge attempts and successful page merges 

•A similar number of page merge attempts and successful page merges 

A MERGE_THRESHOLD  setting that is too small could result in large data files due to an excessive amount of empty page space. 

For information about using INNODB_METRICS  counters, see Section 15.15.6, “InnoDB INFORMATION_SCHEMA Metrics Table” . 

## 15.8.12 Enabling Automatic Configuration for a Dedicated MySQL Server 

When innodb_dedicated_server  is enabled, InnoDB  automatically configures the following variables: 

• innodb_buffer_pool_size 

• innodb_log_file_size 

• innodb_log_files_in_group  (as of MySQL 8.0.14) 

