Documentation Home
MySQL 8.3 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.8Mb
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 294.0Kb
Man Pages (Zip) - 409.0Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

25.6.17.63 NDB信息 threads 表

threads 表提供了 NDB 内核中运行的线程信息。

threads 表包含以下列:

  • node_id

    线程所在节点的 ID

  • thr_no

    线程 ID(特定于该节点)

  • thread_name

    线程名称(线程类型)

  • thread_description

    线程(类型)描述

注意事项

这里显示了一个 2 节点示例集群的示例输出,包括线程描述:

mysql> SELECT * FROM threads;
+---------+--------+-------------+------------------------------------------------------------------+
| node_id | thr_no | thread_name | thread_description                                               |
+---------+--------+-------------+------------------------------------------------------------------+
|       5 |      0 | main        | main thread, schema and distribution handling                    |
|       5 |      1 | rep         | rep thread, asynch replication and proxy block handling          |
|       5 |      2 | ldm         | ldm thread, handling a set of data partitions                    |
|       5 |      3 | recv        | receive thread, performing receive and polling for new receives  |
|       6 |      0 | main        | main thread, schema and distribution handling                    |
|       6 |      1 | rep         | rep thread, asynch replication and proxy block handling          |
|       6 |      2 | ldm         | ldm thread, handling a set of data partitions                    |
|       6 |      3 | recv        | receive thread, performing receive and polling for new receives  |
+---------+--------+-------------+------------------------------------------------------------------+
8 rows in set (0.01 sec)

也可以将 ThreadConfig 参数 mainrep 设置为 0,同时将另一个设置为 1,在这种情况下,线程名称为 main_rep,其描述为 main 和 rep 线程,schema,分布式,代理块和异步复制处理。也可以将 mainrep 都设置为 0,在这种情况下,结果线程的名称显示在该表中为 main_rep_recv,其描述为 main、rep 和 recv 线程,schema,分布式,代理块和异步复制处理,以及处理接收和轮询新的接收