YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Configuration Parameters
Index
Extension
SQL Reference
FAQ
This document introduces the performance tuning ideas in YMatrix, which can cover server system resource tuning, database resource tuning, and SQL tuning.
Performance tuning is a very comprehensive and cannot be ignored.
There are generally two reasons for performance tuning:
One premise:
_1693817912.png)
Describe current performance bottlenecks or performance requirements based on performance monitoring data and other requirements information.
A good problem description should cover the context and clearly describe the problem phenomenon, and should not be too long, usually including but not limited to the following information:
A better description, for example: using the writing tool that comes with the graphical interface of YMatrix 5.0, the number of 280W is entered. After 30 tests, the delay increased from 30 seconds to 1 minute, and the performance dropped by nearly 1 times.
A poor description for example: using a graphical interface to generate test data is getting slower and slower.
Different business scenarios have different optimization goals. For example, for a timing scenario of the Internet of Vehicles, there may be the following optimization goals: improve the performance of aggregation queries and associated queries involved in detailed queries. For a financial core OLTP system, the optimization goal may be: reduce the long-tail delay of transactions, etc.
A good definition of optimization goals should be quantitative, for example:
Instead:
YMatrix recommends collecting but not limited to the following information for analysis:
Based on the collected information, you can just locate or infer the performance bottleneck, and it may take multiple times to collect relevant information to finally locate the problem. For detailed ideas, see Performance Tuning.
Notes!
Communication and collaboration are one of the tricks to quickly analyze the causes.
After determining the performance bottleneck through analysis, an optimization plan with low cost, low risk and maximum benefits is proposed based on actual conditions.
It should be noted that even if a solution has the greatest potential benefits to optimize the maximum bottleneck point, the risks and costs of the solution need to be evaluated simultaneously. Typically, the tuning sequence recommended by YMatrix is as follows: Cost/risk from low to high:
ANALYZE
statement to re-collect statistics in this table; or modify the SQL statement through analysis of the query plan to reduce logical complexity and cost overhead.Notes!
In order to avoid irreparable performance bottlenecks during business operation, please pay more attention to the initial design and scientifically plan, analyze and test the data model of this scenario to ensure its correctness.
The process of implementing tuning usually requires but is not limited to performing the following work:
Generally, performance tuning is not a process that can be completed in one go. For the same performance problem, it may take multiple cycles of steps 2.3 - 2.7 to finally get satisfactory results.
Therefore, it is necessary to evaluate the tuning results intuitively and take the following actions: