以下各节描述与线程池插件相关的性能模式表(参见 第 7.6.3 节,“MySQL 企业线程池”)。它们提供有关线程池操作的信息:The following sections describe the Performance Schema tables associated with the thread pool plugin (see Section 7.6.3, “MySQL Enterprise Thread Pool”). They provide information about thread pool operation:
tp_connections:关于线程池连接的信息。tp_connections: Information about thread pool connections.tp_thread_group_state:关于线程池线程组状态的信息。tp_thread_group_state: Information about thread pool thread group states.tp_thread_group_stats:线程组统计信息。tp_thread_group_stats: Thread group statistics.tp_thread_state:关于线程池线程状态的信息。tp_thread_state: Information about thread pool thread states.
这些表中的行表示时间快照。在 tp_thread_state 的情况下,线程组的所有行组成了一个时间快照。因此,MySQL 服务器在生成快照时会保持线程组的互斥锁。但是,它不会同时保持所有线程组的互斥锁,以防针对 tp_thread_state 的语句阻塞整个 MySQL 服务器。Rows in these tables represent snapshots in time. In the case of
tp_thread_state, all rows for a
thread group comprise a snapshot in time. Thus, the MySQL server
holds the mutex of the thread group while producing the
snapshot. But it does not hold mutexes on all thread groups at
the same time, to prevent a statement against
tp_thread_state from blocking the
entire MySQL server.
性能模式线程池表由线程池插件实现,并在该插件加载和卸载时加载和卸载(参见 第 7.6.3.2 节,“线程池安装”)。表不需要特殊的配置步骤。然而,这些表依赖于线程池插件的启用。如果线程池插件已加载但被禁用,将不会创建这些表。The Performance Schema thread pool tables are implemented by the thread pool plugin and are loaded and unloaded when that plugin is loaded and unloaded (see Section 7.6.3.2, “Thread Pool Installation”). No special configuration step for the tables is needed. However, the tables depend on the thread pool plugin being enabled. If the thread pool plugin is loaded but disabled, the tables are not created.