文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 10 优化 / 10.5 InnoDB 表的优化 / 10.5.10 针对多表系统优化 InnoDB
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

10.5.10 为拥有许多表的系统优化 InnoDB10.5.10 Optimizing InnoDB for Systems with Many Tables

  • 如果您已配置非持久化优化器统计信息(非默认配置),InnoDB会计算索引基数表第一次在启动后被访问时的值,而不是将这些值存储在表中。对于将数据分区到多个表的系统,这个步骤可能会花费大量时间。由于这种开销只适用于初次打开表的操作,要“预热”一个表以供后用,可以在启动后立即通过发出类似的语句来访问它SELECT 1 FROM tbl_name LIMIT 1.If you have configured non-persistent optimizer statistics (a non-default configuration), InnoDB computes index cardinality values for a table the first time that table is accessed after startup, instead of storing such values in the table. This step can take significant time on systems that partition the data into many tables. Since this overhead only applies to the initial table open operation, to “warm up” a table for later use, access it immediately after startup by issuing a statement such as SELECT 1 FROM tbl_name LIMIT 1.

    优化器统计信息默认会持久化到磁盘,这由 innodb_stats_persistent 配置选项启用。有关持久化优化器统计信息的信息,请参见 第 17.8.10.1 节,“配置持久化优化器统计信息参数”。Optimizer statistics are persisted to disk by default, enabled by the innodb_stats_persistent configuration option. For information about persistent optimizer statistics, see Section 17.8.10.1, “Configuring Persistent Optimizer Statistics Parameters”.