ClickHouse Slow Query Management
The Slow SQL page contains two tab pages: Ongoing Slow Queries and Completed Slow Queries. By default, SQL statements whose latency exceeds 500 millisecond in the cluster are displayed. You can manually determine whether to click Kill Query to end an ongoing SQL statement.
Querying Ongoing Slow SQL Statements
- Log in to the CloudTable console.
- Click the name of the target cluster to access its details page.
- In the navigation pane on the left, choose Slow Query Management.
- Use filter criteria such as the latency, time range, user, remote IP, and SQL statement to quickly find out or kill the desired slow queries.
Table 1 Ongoing slow query parameters Parameter
Description
Query ID
ID of each SQL command
Start time
Time when the SQL statement starts to be executed
End time
Time when the SQL statement execution ends
Database
Database that is being queried
SQL Statement
Ongoing SQL statement
Latency (ms)
SQL execution duration
Status
SQL status
User
User who submitted the SQL statement.
Remote IP
Address of the client used by the user who submitted the SQL statement.
Operation
Operation for killing the query
Querying Completed Slow SQL Statements
- Log in to the CloudTable console.
- Click the name of the target cluster to access its details page.
- In the navigation pane on the left, choose Slow Query Management and click Completed Queries.
- Use filter criteria such as the latency, time range, status, user, remote IP, and SQL statement to quickly find out the desired slow queries.
Table 2 Completed slow query parameters Parameter
Description
Query ID
ID of each SQL command
Start time
Time when the SQL statement starts to be executed
End time
Time when the SQL statement execution ends
Database
Queried database
SQL Statement
Completed SQL statement
Latency (ms)
SQL execution duration
Status
SQL status
User
User who submitted the SQL statement.
Remote IP
Address of the client used by the user who submitted the SQL statement.
Slow SQL Query Statuses
The slow SQL query statuses include FINISHED, RUNNING, or CANCELLED. When the status is RUNNING, Kill Query is displayed in the Operation column.
Status |
Description |
---|---|
FINISHED |
The SQL statement has been executed. |
RUNNING |
The SQL statement is running. You can determine whether to stop it. |
CANCELLED |
The execution of the SQL statement is canceled. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot