Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.8Mb
PDF (A4) - 39.9Mb
Man Pages (TGZ) - 257.9Kb
Man Pages (Zip) - 364.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  /  ...  /  The schema_redundant_indexes and x$schema_flattened_keys Views

30.4.3.27 The schema_redundant_indexes 和 x$schema_flattened_keys 视图

schema_redundant_indexes 视图显示重复的索引或由其他索引所重复的索引。 x$schema_flattened_keys 视图是 schema_redundant_indexes 视图的辅助视图。

在以下列描述中,主索引是使重复索引变得不必要的索引。

schema_redundant_indexes 视图具有这些列:

  • table_schema

    包含表的架构。

  • table_name

    包含索引的表。

  • redundant_index_name

    重复索引的名称。

  • redundant_index_columns

    重复索引中的列名。

  • redundant_index_non_unique

    重复索引中的非唯一列数。

  • dominant_index_name

    主索引的名称。

  • dominant_index_columns

    主索引中的列名。

  • dominant_index_non_unique

    主索引中的非唯一列数。

  • subpart_exists

    索引是否只索引部分列。

  • sql_drop_index

    删除重复索引的语句。

x$schema_flattened_keys 视图具有这些列:

  • table_schema

    包含表的架构。

  • table_name

    包含索引的表。

  • index_name

    索引名称。

  • non_unique

    索引中的非唯一列数。

  • subpart_exists

    索引是否只索引部分列。

  • index_columns

    索引中的列名。