tencent cloud

TDSQL Boundless

产品动态
产品简介
产品概述
应用场景
产品架构
实例类型
兼容性说明
使用规范建议
自研内核
内核概述
内核版本更新动态
功能类特性
性能类特性
产品计费
计费概述
购买方式
价格详情
续费说明
欠费说明
退费说明
快速入门
创建实例
连接实例
用户指南
数据迁移
数据同步/订阅
实例管理
参数配置
账号管理
安全组
备份与恢复
数据库审计
标签管理
实践教程
Online DDL 的技术演进与使用实践
锁机制解析与问题排查实践
数据智能调度及相关性能优化实践
TDSQL Boundless 选型指南与实践教程
开发指南
开发指南(MySQL 兼容模式)
开发指南(HBase 兼容模式)
性能调优
性能调优概述
SQL 调优
DDL 调优
性能白皮书
性能概述
TPC-C 测试
Sysbench 测试
API 文档
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
通用参考
系统原理
SQL 参考
数据库参数说明
TPC-H 基准测试数据模型参考
错误码信息
安全与合规
常见问题
服务协议
服务等级协议
服务条款
隐私政策
数据处理和安全协议
联系我们
词汇表

BTHREAD_LIST

PDF
聚焦模式
字号
最后更新时间: 2026-03-06 18:48:07

功能

BTHREAD_LIST视图用于展示当前系统中 bthread 协程的运行状态。列出当前所有活跃的 bthread,便于排查性能、阻塞、资源占用等问题。

字段说明

字段名
类型
描述
bthread_id
bigint unsigned
bthread 的唯一标识符。
stop
smallint unsigned
标识 bthread 当前是否停止运行(0-运行中,1-已停止)。
interrupted
smallint unsigned
表示其他线程是否调用了 bthread_interrupt 中断当前 bthread(0-未中断,1-已中断)。
about_to_quit
smallint unsigned
表示当前 bthread 的调度能否推迟执行(0-不可推迟,1-可推迟)。
yield_count
smallint unsigned
代表 bthread 让出(yield)计数器,用于决定当 bthread 主动让出 CPU 时,应该将它放入哪个队列。
fn
varchar(32)
bthread 调用入口函数的指针。
arg
varchar(32)
bthread 调用入口函数的参数的指针。
attr_stack_type
bigint unsigned
栈类型,取值0-4,对应 bthread_stacktype_t 的值。
attr_flags
bigint unsigned
位标志,对应 bthread_attrflags_t。
attr_keytable_pool
varchar(32)
指向 keytable 的指针。
has_tls
smallint unsigned
表示 bthread 是否有 TLS(线程本地存储)(0-无,1-有)。
uptime_ns
bigint
bthread 从创建到现在的总运行时长(纳秒)。
cputime_ns
bigint
bthread 实际占用 CPU 的执行时长(纳秒)。
nswitch
bigint
上下文切换次数。

示例

tdsql > SELECT * FROM information_schema.bthread_list limit 1 \\G
*************************** 1. row ***************************
bthread_id: 4294980352
stop: 0
interrupted: 0
about_to_quit: 0
yield_count: 0
fn: 0x556eb9fd33a0
arg: 0x7fbc1ab9cd40
attr_stack_type: 3
attr_flags: 0
attr_keytable_pool: NULL
has_tls: 1
uptime_ns: 71092709249214
cputime_ns: 1273570
nswitch: 3
1 row in set (0.00 sec)

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈