El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.
- What's New
- Function Overview
- Service Overview
- Billing
- Getting Started
-
User Guide
- Permissions Management
- Logging in to a DB Instance
-
MySQL
- Account Management
- Database Management
- SQL Operations
- Table Management
- View Management
- Stored Procedure Management
- Event Management
- Trigger Management
- Function Management
- Data Import and Export
- Data Generator (Not Promoted)
- Tracking and Rolling Back Data (Not Promoted)
- Task Management
- Table Structure Comparison and Synchronization (Not Promoted)
- Intelligent O&M (New Version)
- Intelligent O&M (Old Version)
- Microsoft SQL Server
- PostgreSQL
-
RDS for MariaDB
- Account Management
- Database Management
- SQL Operations
- Table Management
- View Management
- Stored Procedure Management
- Event Management
- Trigger Management
- Function Management
- Data Import and Export
- Data Generator (Not Promoted)
- Task Management
- Table Structure Comparison and Synchronization (Not Promoted)
- Intelligent O&M
- GaussDB
-
TaurusDB
- Account Management
- Database Management
- SQL Operations
- Table Management
- View Management
- Event Management
- Stored Procedure Management
- Function Management
- Trigger Management
- Data Import and Export
- Data Generator (Not Promoted)
- Task Management
- Table Structure Comparison and Synchronization (Not Promoted)
- Intelligent O&M
- GeminiDB Cassandra
- GaussDB(DWS) (Unavailable Soon)
- DDS
- DDM
- Audit
- Event Monitoring
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs (in OBT)
- API Version Queries
-
Cloud DBA
- Registering a Database User
- Modifying a Database User
- Deleting a Database User
- Querying Intelligent O&M Quotas
- Querying a Specified Database User
- Querying Database Users
- Killing Sessions
- Querying the SQL Execution Plan (GET Request)
- Querying SQL Execution Plan (POST Request)
- Querying Metadata Locks
- Querying Instance Sessions
- Querying InnoDB Lock Waits
- Enabling or Disabling SQL Explorer and Slow Query Log
- Querying Whether SQL Explorer and Slow Query Log Are Enabled
- Exporting Slow Query Logs
- Exporting SQL Explorer Data
- Querying Whether SQL Statement Concurrency Control Is Enabled
- Enabling or Disabling SQL Statement Concurrency Control
- Querying Concurrency Control Rules of SQL Statements
- Generate Keywords of a Concurrency Control Rule from the Original SQL Statement
- Creating a Concurrency Control Rule for SQL Statements
- Deleting a Concurrency Control Rule of SQL Statements
- Querying SQL Statement Concurrency Control Tasks
- Exporting the Top SQL Template List
- Exporting SQL Execution Time Distribution
- Exporting the Slow SQL Template List
- Viewing the Instance List on the Intelligent O&M Page
- Setting a Shared Link
- Deleting a Shared Link
- Executing a SQL Diagnosis
- Obtaining Diagnosis Results
- Creating an Instance Diagnosis Task
- Querying Instance Diagnosis Reports
- Obtaining an Instance Diagnosis Report
- Deprecated APIs
- Permissions Policies and Supported Actions
- Appendixes
-
FAQs
-
Product Consulting
- How Is DAS Billed?
- Which Data Sources Does DAS Support?
- Does DAS Support Multi-Region Access?
- Where Is SQL Execution Records Saved If I Enable This Function?
- What Should I Enter in the Database Column to Log In to a PostgreSQL DB Instance on the DAS Console?
- Will I Be Changed If I Enable Collect Metadata Periodically and Show Executed SQL Statements on the Add Login Page?
-
Managing connections
- What Should I Do If I Can't Connect to My DB Instance Due to Insufficient Permissions?
- What Should I Do If I Can't Connect to My RDS for MySQL Instance?
- What Should I Do If I Can't Connect to My ECS (MySQL) Instance?
- What Should I Do If I Can't Connect to My RDS for SQL Server Instance?
- What Should I Do If I Can't Connect to My ECS (Microsoft SQL Server) Instance?
- What Should I Do If I Can't Connect to My RDS for PostgreSQL Instance?
- What Should I Do If I Can't Connect to My ECS (PostgreSQL) Instance?
- What Should I Do If I Can't Connect to My DDS Instance?
- What Should I Do If I Can't Connect to My GaussDB(for MySQL) Instance?
- What Should I Do If I Can't Connect to My GaussDB Instance?
- What Should I Do If I Can't Connect to My DDM Instance?
- How Do I View and Modify ECS Security Group Rules?
- How Do I View and Modify Firewall Rules?
- What Should I Do If My Connection Fails?
-
Usage
- What Can I Do If Garbled Characters Are Displayed in the Exported Database Result Set?
- What Are the Precautions for Connecting DAS to a Third-Party Client?
- What Are the Username and Password for DAS?
- What Should I Do If Table Obtaining Times Out?
- How Do I Modify the Collation?
- When a user creates a data tracking task, an error message indicating that the current user does not have the OBS operator permissions is displayed.
- Resource Freezing, Release, Deletion, and Unsubscription
-
Product Consulting
- Glossary
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Service Overview
- Getting Started
-
User Guide
- Permissions Management
- Logging In to the DAS Console
- Adding Login Information
- Modifying Login Information
- Deleting Login Information
- Logging In to Databases Shared by Others
- MySQL DB Instance Management (Development Tool)
- Microsoft SQL Server DB Instance Management (Development Tool)
- PostgreSQL DB Instance Management (Development Tool)
- DDS DB Instance Management (Development Tool)
- Enterprise Change Approval
- Intelligent O&M
- FAQs
- Change History
-
User Guide (Kuala Lumpur Region)
- Service Overview
- Getting Started
-
User Guide
- Permissions Management
- Logging in to a DB Instance
-
MySQL
- Account Management
- Database Management
- SQL Operations
- Table Management
- View Management
- Stored Procedure Management
- Event Management
- Trigger Management
- Function Management
- Data Import and Export
- Data Generator (Not Promoted)
- Tracking and Rolling Back Data (Not Promoted)
- Task Management
- Table Structure Comparison and Synchronization (Not Promoted)
- Intelligent O&M (New Version)
- Intelligent O&M
- RDS for SQL Server
- PostgreSQL
- DDS
- DDM
- Audit
-
FAQs
-
Managing connections
- What Should I Do If I Can't Connect to My RDS for MySQL Instance?
- What Should I Do If I Can't Connect to My ECS (MySQL) Instance?
- What Should I Do If I Can't Connect to My RDS for PostgreSQL Instance?
- What Should I Do If I Can't Connect to My ECS (PostgreSQL) Instance?
- What Should I Do If I Can't Connect to My DDS Instance?
- What Can I Do If a GaussDB(for MySQL) Instance Fails to Be Connected?
- What Should I Do If I Can't Connect to My GaussDB Instance?
- What Should I Do If I Can't Connect to My DDM Instance?
- How Do I View and Modify ECS Security Group Rules?
- How Do I View and Modify Firewall Rules?
- What Should I Do If My Connection Fails?
- Usage
-
Managing connections
- Change History
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Slow Query Logs
This section describes how to analyze slow query logs in a specified period. Slow Query Log displays a chart of SQL statements that are taking too long to execute and allows you to sort slow SQL statements by multiple dimensions, such as by user, host, or SQL template. It helps you quickly identify bottlenecks and improve instance performance.
Precautions
- To use the slow query log function, you need to toggle on Collect Slow Query Logs. Then DAS will store slow query logs for analysis.
- Slow query logs of free instances are retained for only one hour while those of paid instances are retained for seven days by default and can be retained for up to 30 days. After the retention period expires, slow query logs are deleted.
- You can enable the slow query logs function for a maximum of 10 free instances. There is no such a limit on paid instances.
- For free instances, you can only view slow query logs generated in the latest hour.
Viewing Slow Query Logs
- Log in to the DAS console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner, and under Databases, click Data Admin Service.
- In the navigation pane, choose Intelligent O&M > Instance List.
Alternatively, on the Overview page, click Go to Intelligent O&M.
- In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.
Figure 1 Searching for instances
- Locate the instance whose slow query logs you want to manage and click Details.
- Choose SQL > Slow Query Logs.
- Select a time range and view trends, statistics, and details of the slow query logs generated within the time range.
- Log trends
Figure 2 Slow queries over time
In the trends graph, you can hover your mouse at any point in time to view slow query logs or CPU usage.
Above the chart, you can switch to another instance or node to view slow queries by instance or by node.
- Log details
View slow query log details in the lower part of the Slow Query Logs area. The details include the SQL statement, execution time, database name, client, user, execution duration, lock wait duration, and scanned and returned rows.Figure 3 Viewing slow query log details
Click Export to export slow query log details to a specific OBS bucket. After the details are exported, you can click Export History to view export records. You can also download the details to your local PC.
Figure 4 Exporting slow query log details
NOTE:This function is available to only paid instances.
Locate the SQL template you want to diagnose and click Diagnose in the Operation column.
- Slow query log statistics
Figure 5 Slow query log statistics
Click Sample in the Operation column to view the sample of the SQL statement template.
On the Statistics page, click Export to export slow query logs to a specific OBS bucket. Then you can click Export History to view export records. You can also download the exported slow query logs to your local PC.
NOTE:This function is available to only paid instances.
- Log trends
Slow Query Log Storage
After Collect Slow Query Logs is enabled, SQL text content will be stored in OBS for analysis.
Slow query logs of free instances are retained for only one hour while those of paid instances are retained for seven days by default and can be retained for up to 30 days. After the retention period expires, slow query logs are deleted.
For paid instances, you can click Log Settings to set the storage duration on the Slow Query Logs tab page.
Each paid instance can use 5 GB of storage for slow query logs for free. Any storage used in excess of 5 GB will be billed on a pay-per-use basis.
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