tencent cloud

TencentDB for MySQL

SLOW_LOG

PDF
Focus Mode
Font Size
Last updated: 2025-05-09 11:51:24

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
The time when the SQL execution started.
tso
bigint(20) unsigned
NO
The unique identifier of the SQL statement.
sql
text
NO
The SQL text information.
duration
bigint(20) unsigned
NO
The execution time of the SQL statement.
details
text
NO
Detailed information about the SQL execution.
conn_id
bigint(20) unsigned
NO
The session ID of the client connection.
user
text
NO
The username used for execution.
db
text
NO
The 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