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

Performance Tuning

Updated on 2025-02-12 GMT+08:00

Setting Synchronization Task Parameters

  • max_full_sync_task_threads_num: number of full synchronization threads. By default, it is set to half of the vCPUs on FE nodes. Increasing this value will make full synchronization faster, but more vCPUs and memory of OLTP and OLAP will be consumed. Set an appropriate value for this parameter based on the system load when executing a full synchronization task. If multiple full synchronization tasks are executed at the same time, decrease this parameter value.
  • max_incremental_sync_task_threads_num: number of incremental synchronization threads. By default, it is set to half of the vCPUs on FE nodes. A larger value indicates that more threads are used for incremental synchronization, more resources are consumed, and the synchronization latency is shorter. If there are more than five synchronization tasks on an instance, reduce the number of synchronization threads for each task.
  • expect_tablet_size: expected size of source data stored in each bucket, in GB. The default value is 3. If most tables in a database have less than 3 GB of data and there are only a few tables with more data, decrease this value.
  • expect_tablet_num_for_one_partition: expected default number of buckets in each partition. If this parameter is set to 0, the number of buckets is calculated based on the data size. The default value is 2. If there is no data in a table, this default value will be used. If there is data in a table, the number of buckets is calculated as follows: Data size/Value of expect_tablet_size. If a partition key is specified for table synchronization, you need to evaluate the number of buckets required for data in each partition. The number of buckets for a table is calculated as follows: Number of partitions x Number of buckets in each partition.

Improving Query Performance

  • SQL tuning

    Do not use SELECT *. Remove redundant columns and functions.

  • Query cache

    The query cache is suitable for scenarios where data can be categorized as hot data and cold data and aggregate queries are frequently executed. To enable the query cache, use DAS to connect to the OLAP database and execute SET GLOBAL enable_query_cache=true;

  • Sorting keys

    Add commonly used filter criteria to sorting keys. The order of the sorting keys should be determined based on their usage frequency and data cardinality, with priority given to high cardinality. You are advised to set no more than five sorting keys. Sorting keys are widely used for tuning OLAP performance. When creating a synchronization task, you can use table synchronization to set sorting keys.

  • Partitions

    A time column whose value does not change is often used for the WHERE filtering. Use the column to create partitions. When creating a synchronization task, you can use table synchronization to set partitions.

  • Indexes

    Add indexes to the columns used for filtering. Bitmap indexes are suitable for columns with a cardinality of around 10,000 to 100,000. Bloom filter indexes are suitable for columns with a cardinality of more than 100,000. After data is synchronized, you can connect to the OLAP database through DAS and run SQL commands to create indexes.

  • Materialized views

    If there are multiple frequently used queries with different filter criteria and sorting keys can only adapt to one query, create a materialized view to adapt to other queries. After data is synchronized, you can connect to the OLAP database through DAS and run SQL commands to create materialized views.

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