tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Configuration Change
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
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
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

DDL_JOB_STAGE_INFO

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-02-10 11:06:28

Function

DDL operations are characterized by their multi-phase, long-running nature, involving multiple execution stages and several RPC interactions with TDStore. However, during debugging or online DDL execution, there is a probability of DDL operations getting stuck. You can now query the INFORMATION_SCHEMA.DDL_JOB_STAGE_INFO view to display runtime information for each executing DDL job, including time consumption across various stages and RPC interactions. This enables users, DBAs, and kernel developers to pinpoint the current execution position when a DDL operation gets stuck (without having to check the DDL operation logs specifically).
Note:
The recommended usage on the primary execution node for DDL: SELECT * FROM information_schema.DDL_JOB_STAGE_INFO ORDER BY ddl_job_id\\G
Recommended usage on non-primary nodes for DDL execution: /*#all_nodes */ SELECT * FROM information_schema.DDL_JOB_STAGE_INFO ORDER BY ddl_job_id\\G

Field Description

Field Name
Type
Description
DDL_JOB_ID
int unsigned
id of the currently executing DDL job.
CURRENT_STAGE_TYPE
varchar(64)
NORMAL: indicates that the logic of the DDL foreground thread is being executed.
RECOVERY: indicates that the logic of the DDL background thread is being executed (such as asynchronous DROP Table operations).
CURRENT_STAGE_NAME
varchar(64)
Indicates which function the current DDL logic is executing in.
CURRENT_STAGE_SOURCE
varchar(64)
Indicates the function file name and line number of code for the current DDL execution.
HISTORY_STAGE_INFOS
varchar(4096)
Indicates the historical stage information of the current DDL execution, typically starting from START_DDL_JOB through END_DDL_JOB.
CURRENT_SQL_QUERY
varchar(2048)
Indicates the SQL being executed for the current DDL.
DDL_START_TIME
varchar(64)
Indicates the start time of the current DDL execution.
STAGE_START_TIME
varchar(64)
Indicates the start time of the current stage.
DDL_DURATION
varchar(64)
Indicates the time interval from the start of the current DDL execution to the current time point.
STAGE_DURATION
varchar(64)
Indicates the time interval from the start of the current stage to the current time point.
DDL_ERROR_CODE
int
If an exception occurs, the code of the current exception will be printed. Conversely, it is NULL.
DDL_ERROR_TEXT
varchar(2048)
If an exception occurs, the textual message of the current exception will be printed. Otherwise, it is NULL.

Examples

tdsql> SELECT * FROM information_schema.DDL_JOB_STAGE_INFO ORDER BY ddl_job_id\\G
*************************** 1. row ***************************
DDL_JOB_ID: 115
CURRENT_STAGE_TYPE: NORMAL
CURRENT_STAGE_NAME: SetDDLJobStatusSucc
CURRENT_STAGE_SOURCE: ddl_common.cc:725
HISTORY_STAGE_INFOS: [161ms][RPC 18ms][CREATE TABLE DDL][2025-09-01 15:09:37 ~ RUNNING]
├──> [OK ][25ms][RPC 1ms][START_DDL_JOB][start_ddl_job][ddl_worker.cc:994][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
├──> [RUN][135ms][RPC 17ms][CREATE_TABLE_NO_LOCK][mysql_create_table_no_lock][sql_table.cc:9993][2025-09-01 15:09:37 ~ RUNNING]
├──> [RUN][135ms][RPC 17ms][CREATE_TABLE_IMPL][create_table_impl][sql_table.cc:9539][2025-09-01 15:09:37 ~ RUNNING]
├──> [OK ][112ms][RPC 9ms][CREATE_DATA_OBJECTS_FOR_TABLE][CreateDataObjectsForTable][data_object.cc:2150][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
├──> [OK ][103ms][RPC 3ms][CREATE_DATA_OBJECT][CreateDataObjects][data_object.cc:1327][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
├──> [OK ][0ms][RPC 0ms][CREATE_AUTO_INC_FOR_TABLE][CreateAutoIncForTable][auto_inc_index.cc:247][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
├──> [OK ][5ms][RPC 4ms][CREATE_WRITE_FENCE_FOR_TABLE][CreateWriteFenceForTable][ddl_executer.cc:2480][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
├──> [OK ][5ms][RPC 4ms][CREATE_WRITE_FENCE][CreateWriteFence][ddl_executer.cc:1269][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
├──> [OK ][0ms][RPC 0ms][SET_DDL_JOB_STATUS_SUCCESS][SetDDLJobStatusSucc][ddl_common.cc:725][2025-09-01 15:09:37 ~ 2025-09-01 15:09:37]
CURRENT_SQL_QUERY: CREATE TABLE sbtest85(
id INTEGER NOT NULL,
k INTEGER DEFAULT '0' NOT NULL,
c CHAR(120) DEFAULT '' NOT NULL,
pad CHAR(60) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
) /*! ENGINE = rocksdb */
DDL_START_TIME: 2025-09-01 15:09:37
STAGE_START_TIME: 2025-09-01 15:09:37
DDL_DURATION: 161ms
STAGE_DURATION: 3ms
DDL_ERROR_CODE: NULL
DDL_ERROR_TEXT: NULL

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백