Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

SQL Insights

Updated on 2025-01-17 GMT+08:00

The SQL Insights module allows you to query all executed SQL statements, as well as analyze and search for the tables that are accessed and updated most frequently, and the SQL statements that have the longest lock wait, helping you quickly identify exceptions and ensuring database stability.

Usage Notes

  • You need to enable Collect All SQL Statements before using SQL Insights. Collecting all SQL statements generates a performance loss of no more than 5%.
  • After Collect All SQL Statements is disabled, new SQL statements will not be collected and the collected SQL statements will be deleted.
  • Some data cannot be recorded if a buffer overrun occurs.
  • Any SQL statement that exceeds 4096 bytes is discarded by default.

    This constraint can be removed by setting parameter rds_sql_tracer_reserve_big_records for RDS for MySQL kernel versions 5.7.33.3 or later. RDS for MySQL 5.6 and 8.0 do not support this parameter. You can set the parameter to ON by referring to Modifying RDS for MySQL Instance Parameters, which means that SQL data records containing more than 4,096 bytes are stilled recorded.

  • Currently, SQL Explorer takes a period of time to consume and parse raw data. Data of TOP SQL and SQL Insights tasks has a latency of about 5 minutes.
  • Logs of all SQL statements executed on free instances can be retained for only one hour while those for paid instances can be retained for seven days by default and for up to 30 days as a maximum. After the retention period expires, the logs are deleted.
  • This function is supported only in DAS 5.6.51.1 and later, 5.7.29.2 and later, and 8.0.20.3 and later versions.

Procedure

  1. Log in to the Huawei Cloud console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner, and under Databases, click Data Admin Service.
  4. In the navigation pane, choose Intelligent O&M > Instance List.

    Alternatively, on the Overview page, click Go to Intelligent O&M.

  5. 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

  6. Locate the target instance and click Details.
  7. Choose SQL > SQL Insights.

    Toggle on on the right of Collect All SQL Statements.

    You can also click Log Settings in the upper right corner of the page to enable Collect All SQL Statements.

    Figure 2 Configuring log settings
    NOTE:

    Collect All SQL Statements takes effect once it is enabled.

    If you want to disable Collect All SQL Statements, click Log Settings in the upper right corner and toggle off the switch.

  8. Click Create Task. In the displayed dialog box, specify Time Range, Dimension, and other configuration items and click OK.

    Figure 3 Creating a task

  9. In the task list, view the task you created.

    Figure 4 Viewing a task
    • Locate the row containing your task and click Details in the Operation column to view task details.
    • Locate your task and click View Syn Tasks in the Operation column to view synchronization task details.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback