InnoDB System Variables • innodb_stats_include_delete_marked • innodb_stats_method Command-Line Format --innodb-stats-include-delete- marked[={OFF|ON}] System Variable innodb_stats_include_delete_marked Scope Global Dynamic Yes SET_VAR  Hint Applies No Type Boolean Default Value OFF By default,  InnoDB  reads uncommitted data when calculating statistics. In the case of an uncommitted transaction that deletes rows from a table,  InnoDB  excludes records that are delete-marked when calculating row estimates and index statistics, which can lead to non-optimal execution plans for other transactions that are operating on the table concurrently using a transaction isolation level other than READ UNCOMMITTED . To avoid this scenario,  innodb_stats_include_delete_marked  can be enabled to ensure that  InnoDB  includes delete-marked records when calculating persistent optimizer statistics. When  innodb_stats_include_delete_marked  is enabled,  ANALYZE TABLE  considers delete- marked records when recalculating statistics. innodb_stats_include_delete_marked  is a global setting that affects all  InnoDB  tables. It is only applicable to persistent optimizer statistics. For related information, see Section 15.8.10.1, “Configuring Persistent Optimizer Statistics Parameters” . Command-Line Format --innodb-stats-method=value System Variable innodb_stats_method Scope Global Dynamic Yes SET_VAR  Hint Applies No Type Enumeration Default Value nulls_equal Valid Values nulls_equal nulls_unequal nulls_ignored How the server treats  NULL  values when collecting statistics about the distribution of index values for InnoDB  tables. Permitted values are  nulls_equal ,  nulls_unequal , and  nulls_ignored . For nulls_equal , all  NULL  index values are considered equal and form a single value group with a size equal to the number of  NULL  values. For  nulls_unequal ,  NULL  values are considered unequal, and each  NULL  forms a distinct value group of size 1. For  nulls_ignored ,  NULL  values are ignored. The method used to generate table statistics influences how the optimizer chooses indexes for query execution, as described in Section 8.3.8, “InnoDB and MyISAM Index Statistics Collection” . 3283