Data Admin Service
Data Admin Service
- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Overview
- Permissions Management
- Logging In to the DAS Console
- Adding Login Information
- Logging In to a Database
- Modifying Login Information
- Deleting Login Information
- Logging In to Databases Shared by Others
- MySQL DB Instance Management (Development Tool)
- RDS for PostgreSQL Instance Management (Development Tool)
- DDS DB Instance Management (Development Tool)
- Distributed DDM DB Instance Management (Development Tool)
- Intelligent O&M
- Audit
- Change History
- Best Practices
-
FAQs
- Product Consulting
-
Connection Management (Development Tool)
- 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 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 DDM Instance?
- How Do I View and Modify ECS Security Group Rules?
- How Do I View and Modify Firewall Rules?
- Usage
- Service Support
- Change History
- Videos
On this page
Show all
Help Center/
Data Admin Service/
Best Practices/
SQL Explorer/
How Do I Check and Optimize Tables by Checking Top SQL?
How Do I Check and Optimize Tables by Checking Top SQL?
Updated on 2023-04-20 GMT+08:00
Example Problem
A user found in the exported logs that it took more than 2s for a SELECT statement to query information of table test and the lock wait duration was long.
This feature is available only in regions CN-Hong Kong, CN East-Shanghai1, AP-Singapore, and LA-Sao Paulo1.
Suggestion
- Add indexes.
- Optimize tables
Procedure
- Log in to the DAS console.
- Choose Intelligent O&M > Instance List.
- On the Instance Overview page, locate the instance you want to view and click Details.
- On the displayed page, choose SQL > SQL Explorer.
- Click the TOP SQL tab.
- In the template list, locate the required SELECT template and click Details in the Operation column.
- In the SQL statement list, locate database db_test whose template execution took over 2s.
- Log in to the target instance on the Development Tool page and choose Database Management. Select the database found in 7. Choose Tables in the navigation pane on the left, locate the table that you want to view, and click View in the Operation column. View the index length and row count in the table.
- (Example) If there are few indexes, click Alter and add indexes. Return to the Tables tab and click Query SQL Statements.
Parent topic: SQL Explorer
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.