- 28.5.1 INFORMATION_SCHEMA 线程池表参考28.5.1 INFORMATION_SCHEMA Thread Pool Table Reference
- 28.5.2 INFORMATION_SCHEMA TP_THREAD_GROUP_STATE 表28.5.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table
- 28.5.3 INFORMATION_SCHEMA TP_THREAD_GROUP_STATS 表28.5.3 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table
- 28.5.4 INFORMATION_SCHEMA TP_THREAD_STATE 表28.5.4 The INFORMATION_SCHEMA TP_THREAD_STATE Table
INFORMATION_SCHEMA 线程池表已被弃用,并可能在 MySQL 的未来版本中被移除。您应改用作为 Performance Schema 表提供的版本。请参阅 第 29.12.16 节,“Performance Schema 线程池表”。应用程序应从旧表过渡到新表。例如,如果应用程序使用此查询:The INFORMATION_SCHEMA thread pool tables are
deprecated, and subject to removal in a future version of MySQL.
You should use the versions available as Performance Schema tables
instead. See
Section 29.12.16, “Performance Schema Thread Pool Tables”.
Applications should transition away from the old tables to the new
tables. For example, if an application uses this query:
SELECT * FROM INFORMATION_SCHEMA.TP_THREAD_STATE;
应用程序应改用此查询:The application should use this query instead:
SELECT * FROM performance_schema.tp_thread_state;
下面的各节描述了与线程池插件相关的 INFORMATION_SCHEMA 表(请参阅 第 7.6.3 节,“MySQL Enterprise 线程池”)。它们提供有关线程池操作的信息:The following sections describe the
INFORMATION_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_THREAD_GROUP_STATE:有关线程池线程组状态的信息TP_THREAD_GROUP_STATE: Information about thread pool thread group statesTP_THREAD_GROUP_STATS:线程组统计信息TP_THREAD_GROUP_STATS: Thread group statisticsTP_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.
INFORMATION_SCHEMA 线程池表由各个插件实现,是否加载其中某一个表可以独立于其他表决定(参见 第 7.6.3.2 节,“线程池安装”)。然而,所有表的内容都依赖于线程池插件被启用。如果表插件启用但线程池插件未启用,该表虽然可见且可以访问,但内容为空。The INFORMATION_SCHEMA thread pool tables are
implemented by individual plugins and the decision whether to load
one can be made independently of the others (see
Section 7.6.3.2, “Thread Pool Installation”). However, the content of
all the tables depends on the thread pool plugin being enabled. If a
table plugin is enabled but the thread pool plugin is not, the table
becomes visible and can be accessed but is empty.