Viewing Slow Query Logs of RDS for PostgreSQL DB Instances
Scenarios
- SELECT
- INSERT
- UPDATE
- DELETE
- CREATE
- DROP
- ALTER
- DO
- CALL
- COPY
Parameter Description
Parameter |
Description |
---|---|
log_min_duration_statement |
Specifies the minimum execution time. The statements whose execution time is greater than or equal to the value of this parameter are recorded. If this parameter is set to a smaller value, the number of log records increases, which increases the disk I/O and deteriorates the SQL performance. |
log_statement |
Specifies the statement type. The value can be none, ddl, mod, or all. The default value is none. If you change the value to all:
|
log_statement_stats |
Specifies whether to output performance statistics to server logs. The default value is off. If you change the value to on:
|
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the target DB instance.
- In the navigation pane on the left, choose Logs. On the Slow Query Logs page, click Log Details.
You can view the slow query log records of a specified statement type in a specified time period.
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