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

Doris Slow Query Detection

Updated on 2024-12-13 GMT+08:00

Scenario

As a ROLAP database, Doris relies on a powerful relational database engine at its foundation. High concurrency and aggregation queries are commonly used. MRS Doris lacks slow query detection capabilities, making it difficult to monitor query execution for troubleshooting. To improve Doris's O&M capabilities, we developed the slow query detection function.

Doris slow query information can be displayed and managed on Manager only after this function enabled. By default, this function is disabled to reduce the impact on environment resources. You can enable this function with custom parameter query_history_enable.

This function is available only for MRS 3.5.0 and later versions.

Prerequisites

  • A cluster containing the Doris service has been created, and all services in the cluster are running properly.
  • The nodes to be connected to the Doris database can communicate with the MRS cluster.
  • The MySQL client has been installed. For details, see Using the MySQL Client to Connect to Doris.

Enabling Slow Query Detection

  1. Log in to FusionInsight Manager and choose Cluster > Services > Doris > Configurations > All Configurations > FE(Role) > Customization.
  2. Add the query_history_enable parameter to the custom parameter fe.conf.customized.configs and set the parameter value to true.
  3. Click Save, and then click OK to save the configurations.
  4. Click Instances, select the affected FE instances, choose More > Restart Instance. Enter the password of the user and click OK to apply the configuration.
  5. After connecting the MySQL client to Doris, run the following command to view the slow queries executed by the Doris:

    select * from __internal_schema.query_history;

  6. On FusionInsight Manager, choose Cluster > Services > Doris > Queries to view Ongoing Slow Queries and Completed Slow Queries. You can also view the top 10 users who execute slow queries, IP addresses of the clients that submit slow SQL statements, and slow query statements.

    • Top 10 Users: top 10 Doris users who perform slow queries
    • Top 10 IP Addresses: IP addresses of top 10 Doris clients that execute slow queries
    • Top 10 SQL Statements: top 10 most executed slow query SQL statements on the Doris client

Ongoing Slow Queries

You can query information about slow SQL statements that are being executed but do not return any result.

  • Access path

    Log in to FusionInsight Manager, choose Cluster > Services > Doris > Queries, and click the Ongoing Slow Queries tab. For details about the parameters, see Table 2.

  • Filter conditions

    Select the query condition as required and filter the query results.

    Table 1 Filter conditions

    Conditions

    Parameter Description

    Slow query duration exceeding

    Filters the slow SQL queries based on the duration.

    The value can be 3 (s), 9 (s), 15 (s), or 25 (s).

    By Query ID

    Filters the slow queries based on the query ID.

    Fuzzy search based on the query ID is supported. For example, if the query ID is 111-222-333-444-555, you can enter part of it such as 111-222 or -222-333 to query the needed information.

    By User

    Filters the slow queries based on Doris users who execute the SQL statements.

    Fuzzy search based on part of a username is supported.

    By Client IP Address

    Filters the slow queries based on the IP address of the client that submits slow query SQL statements.

    Fuzzy search based on part of the client IP address is supported. For example, if the client IP address is 192.168.0.1, you can enter part of it such as 192.168 or 192.168.0 to query the information you need.

Completed Slow Queries

You can query information about slow query SQL statements that have been executed and returned results.

Log in to FusionInsight Manager and choose Cluster > Services > Doris. On the displayed page, click the Query Management tab and then the Completed Queries tab.

For details about slow query parameters and filter conditions, see Table 2 and Table 1, respectively.

Slow Query Detection Parameters

Table 2 Slow query parameters

Parameter

Description

Query ID

Unique ID generated internally.

Query

Slow query SQL statement.

Start Time

Time when the query starts.

End Time

Time when the query is complete.

Database

Name of the database where the table in the query is.

Instance Name

FE instance node that executes the query. It is displayed for Ongoing Slow Queries only.

Memory Used

Memory space consumed by the query, in bytes. This field is displayed for Completed Queries only.

Duration

Total execution time of the query, in seconds.

User

Doris user who executes the query.

Client IP Address

IP address of the client that submits the query.

Status

Execution status of the query. Possible values are as follows:

  • Running: queries being executed
  • Cancelled: slow queries stopped by clicking Terminate in the Operation column in the Ongoing Slow Queries tab
  • Completed: slow queries that have been properly executed

Operation

Column available for Ongoing Slow Queries only. You can click Terminate to stop a query.

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