SQL Diagnosis
DWS clusters support SQL diagnosis, which shows the complete execution plans of specific SQL queries. You can search for SQL queries (such as slow queries) using a combination of multiple filter criteria.
To use SQL diagnosis, perform the following steps:
- Log in to the DWS console.
- Locate the cluster to be monitored.
- In the Operation column of the target cluster, click Monitoring Panel.
- In the navigation pane on the left, choose Utilities > SQL Diagnosis.
- On the SQL Diagnosis page, you can view the SQL diagnosis information. For details about the metrics, see Table 1.
Table 1 SQL diagnosis metrics Metric
Description
Query ID
Internal query_ID used for statement execution
Databases
Database name
Schema Name
Name of the schema
Username
Username
Client
Name of the application connected to the backend
Client IP Address
IP address of the client connected to the backend. If this column is null, it indicates that the client is connected via a Unix socket on the server machine or that it is an internal process, such as autovacuum.
Running Time (ms)
Execution time of the statement, in milliseconds
CPU Time (ms)
Total CPU time of a statement across all DNs, in milliseconds
Start Time
Time when the statement starts to be executed
Completed
End time of statement execution
Details
Click View to view the detailed diagnosis result of the SQL statement. including:
- Alarm information about the SQL statement
- SQL statement
- Execution plan of the SQL statement
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.