tencent cloud

TDSQL-C for MySQL

SLOW_LOG

PDF
Focus Mode
Font Size
Last updated: 2025-10-23 17:50:11

Feature

SLOW_LOG is a system table that records slow SQL queries. In the read-only analysis engine, any SQL statement with an execution time exceeding 300ms will be logged in this table. By default, slow query records are retained for 7 days.

Query Example

select * from libra_system.slow_log;

Field Description

Field Name
Type
Nullable
Description
start_time
text
NO
Time when the SQL execution started.
tso
bigint(20) unsigned
NO
Unique identifier of the SQL statement.
sql
text
NO
SQL text information (the maximum length is 4 KB, and the exceeded part will be truncated).
duration
bigint(20) unsigned
NO
SQL execution time (in ms).
details
text
NO
Detailed information about the SQL execution.
conn_id
bigint(20) unsigned
NO
Session ID of the client connection.
user
text
NO
Username used for execution.
db
text
NO
Database involved.
digest
text
NO
Reserved column name (currently unused).
succ
tinyint(3) unsigned
NO
Whether the SQL statement was executed successfully.
host
text
NO
Information about the node that executed the SQL statement.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback