Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Usage Rules
- Billing Management
- Data Migration
- Instance Lifecycle Management
- Instance Modifications
- Read Replicas
- Database Management
- Account Management (Non-Administrator)
- Data Security
- Data Backups
- Data Restorations
- Connection Management
-
Parameter Template Management
- Creating a Parameter Template
- Modifying a Parameter Template
- Exporting Parameters
- Comparing Parameter Templates
- Viewing Parameter Change History
- Replicating a Parameter Template
- Resetting a Parameter Template
- Applying a Parameter Template
- Viewing Application Records of a Parameter Template
- Editing a Parameter Template Description
- Deleting a Parameter Template
- Metrics and Alarms
- Interconnection with CTS
- Log Management
- Task Center
- Managing Tags
- Managing Quotas
- Change History
- Best Practices
- Performance White Paper
- Security White Paper
- SDK Reference
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs (Recommended)
- DB Engine Version Queries
- Database Specification Queries
-
Instance Management
- Creating a DB Instance
- Querying DB Instances
- Rebooting a DB Instance
- Deleting a DB Instance
- Querying Details of a DB Instance
- Querying Details of DB Instances in Batches
- Creating a Read Replica
- Deleting a Read Replica
- Scaling up Storage of a Yearly/Monthly DB Instance
- Changing a DB Instance Name
- Resetting a Database Password
- Changing DB Instance Specifications
- Querying Dedicated Resource Pools
- Querying Dedicated Resources
- Configuring the Monitoring By Seconds Function
- Querying the Configuration of Monitoring by Seconds
- Enabling or Disabling SSL
- Binding an EIP
- Unbinding an EIP
- Promoting a Read Replica to Primary
- Changing a Maintenance Window
- Modifying a Security Group
- Changing a Private IP Address
- Changing a Database Port
- Changing a DB Instance Description
- Backup Management
- Parameter Template Management
- Quota Management
- Log Management
- Tag Management
- Database User Management
- Database Management
- SQL Statement Concurrency Control
- Task Center
- APIs (Unavailable Soon)
- Permissions Policies and Supported Actions
- Appendix
- Change History
-
FAQs
- Product Consulting
-
Database Connections
- Can an External Server Access the GaussDB(for MySQL) Database?
- What Do I Do If the Number of GaussDB(for MySQL) Database Connections Reaches the Upper Limit?
- What Is the Maximum Number of Connections to a GaussDB(for MySQL) Instance?
- What Should I Do If an ECS Cannot Connect to a GaussDB(for MySQL) Instance?
- How Can I Connect to a MySQL Database Through JDBC?
- How Can I Create and Connect to an ECS?
- What Should I Do If a Database Client Problem Causes a Connection Failure?
- Why Cannot I Ping My EIP After It Is Bound to a DB Instance?
- What Can I Do If the Connection Test Failed?
- Can I Access a GaussDB(for MySQL) Instance over an Intranet Connection Across Regions?
- Are There Any Potential Risks If There Are Too Many Connections to a GaussDB(for MySQL) Instance?
- What Should I Do If an ECS and a GaussDB(for MySQL) instance Deployed in Different VPCs Cannot Communicate with Each Other?
- How Do I View All IP Addresses Connected to a Database?
- Client Installation
- Database Migration
- Database Permissions
-
Database Performance
- What Should I Do If the CPU Usage of My Instance Is High?
- How Do I Handle Slow SQL Statements Caused by Inappropriate Composite Index Settings?
- How Do I Handle a Large Number of Temporary Tables Being Generated for Long Transactions and High Memory Usage?
- What Should I Do If Locks on Long Transactions Block the Execution of Subsequent Transactions?
- Database Usage
- Backups
-
Database Parameter Modification
- How Can I Change the Time Zone?
- How Do I Configure a Password Expiration Policy for GaussDB(for MySQL) Instances?
- How Do I Ensure that the Database Character Set of a GaussDB(for MySQL) Instance Is Correct?
- How Do I Use the utf8mb4 Character Set to Store Emojis in a GaussDB(for MySQL) Instance?
- How Do I Set Case Sensitivity for GaussDB(for MySQL) Table Names?
- Can I Use SQL Commands to Modify Global Parameters?
-
Network Security
- What Security Assurance Measures Does GaussDB(for MySQL) Have?
- How Can I Prevent Untrusted Source IP Addresses from Accessing GaussDB(for MySQL)?
- How Do I Configure a Security Group to Enable Access to a GaussDB(for MySQL) Instance?
- How Can I Import the Root Certificate to a Windows or Linux Server?
- How Do I Manage and Ensure GaussDB(for MySQL) Security?
- Log Management
- Version Upgrade
- Change History
-
Troubleshooting
-
Backup and Restoration Issues
- Insufficient Permissions During Data Export Using mysqldump
- How Do I use mysqlbinlog to Obtain Binlog Files?
- Canal Fails to Parse Binlogs
- Precautions for Exporting Large Tables Through mysqldump
- Commands for Exporting Data Through mysqldump
- System Inaccessible After Field Addition to a Database Table
- SQL Statements Such as SET @@SESSION.SQL_LOG_BIN Displayed After You Run mysqldump
- Insufficient Permissions Reported for Canal
-
Connection Issues
- Login Failed After ssl_type of root Is Changed to ANY
- Failed to Connect to a DB Instance Using SSL
- Description of Each IP Address
- SSL Connection Failed Due to Inconsistent TLS Versions
- Error Message "connection established slowly"
- "Access denied" Displayed During Database Connection
- Failed to Connect to a Database Using mariadb-connector in SSL Mode
- Failed to Connect to a Database as User root
- Client Automatically Disconnected from a DB Instance
- Disconnection Occurs Every 45 Days Due to the istio-citadel Certificate Mechanism
-
SQL Issues
- Invalid TIMESTAMP Default Value during Table Creation
- Failed to Change the VARCHAR Length Due to the Index Length Limit
- Slow SQL Queries After a Large Amount of Data Is Deleted from a Large Table
- Error 1366 Reported When Data Containing Emojis Is Updated
- Slow Stored Procedure Execution Due to Inconsistent Collations
- ERROR [1412] Reported for a DB Instance
- Failed to Delete a Table with a Foreign Key
- Incorrect GROUP_CONCAT Results
- Error Message "Too many keys specified" Displayed When a Secondary Index Is Created
- DISTINCT and GROUP BY Optimization
- Equivalent Comparison Failures with Floating-Point Numbers
- Tablespace Bloat
- ERROR 1396 Reported When a User Is Created
- Error Message Reported When alter table xxx discard/import tablespace Is Executed
- Native Error 1461 Reported by a DB Instance
- "Row size too large" Reported When a Table Failed to Be Created
- Parameter-related Issues
- Performance Issues
-
Basic Issues
- How Do I View Used Storage of My GaussDB(for MySQL) Instance?
- Renaming Databases and Tables
- Character Set and Collation Settings
- Auto-Increment Field Value Jump
- Starting Value and Increment of AUTO_INCREMENT
- Changing the AUTO_INCREMENT Value of a Table
- Failed to Insert Data Because Values for the Auto-increment Primary Key Field Reach the Upper Limit
- Auto-increment Field Values
- AUTO_INCREMENT Not Displayed in the Table Structure
- Impact of Creating an Empty Username
- No Scanned Rows Recorded in Slow Query Logs
- Change History
-
Backup and Restoration Issues
- Videos
Test Method
GaussDB(for MySQL) is a MySQL-compatible, enterprise-grade distributed database service. It uses a compute-storage decoupled architecture and supports up to 128 TB of storage. With GaussDB(for MySQL), there is no need to do sharding, and no need to worry about data loss. It provides the superior performance of commercial databases at the price of open-source databases.
Test Environment
GaussDB(for MySQL) test environment is as follows:
- Region: EU-Dublin
- AZ: AZ1
- Instance: The instance contains a primary node and a read replica for the test.
- Elastic Cloud Server (ECS): general computing-plus | c7.8xlarge.4 | 32 vCPUs | 128 GB, CentOS 7.6 (64 bit). The ECS and instance nodes are in the same AZ. Bind an EIP to the ECS because additional compilation tools need to be installed on stress testing tools.
Test Tool
Tool |
Description |
Version |
---|---|---|
Sysbench |
Sysbench is a multi-threaded benchmark tool based on LuaJIT. It is most frequently used for database benchmarks. With sysbench, you can quickly get an impression of database performance. For details, visit https://github.com/akopytov/sysbench |
Perform the following commands to install sysbench:
Log in to an ECS and download the sysbench software package:
wget https://codeload.github.com/akopytov/sysbench/zip/refs/tags/1.0.18
yum install -y autoconf libtool mysql mysql-devel vim unzip
Decompress the software package.
unzip 1.0.18
Install the software package.
cd sysbench-1.0.18
./autogen.sh
./configure
make
make install
Test Procedure
The following tests are performed on an ECS. Replace the number of concurrent threads, connection IP address, connection port, username, and user password based on the site requirements.
Performance test data (including SQL) is automatically generated by the sysbench tool.
The ECS and the instance are in the same AZ.
To ensure that sysbench runs properly in high-concurrency scenarios (concurrent requests: 512-1000), increase the value of max_prepared_stmt_count. The recommended value is 1048576. Too many Prepare statements consume a lot of memory space, resulting in out-of-memory (OOM). For an instance with 4 vCPUs and 16 GB memory, set this parameter to 400000.
To improve performance, configure the following parameter and reboot the instance. Modifying the parameter value does not affect the product functions and reliability.
log-bin: OFF
Testing write-only performance:
- Import data.
- Create the test database sbtest.
mysql -u<user>-P <port> -h <host> -p -e "create database sbtest"
- Import the test background data to the sbtest database.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=25000 --tables=250 --threads=<thread_num> oltp_common prepare
- Create the test database sbtest.
- Test the write-only performance. The process takes about 10 minutes.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=25000 --tables=250 --time=600 --threads=<thread_num> --percentile=95 --report-interval=1 oltp_write_only run
- Delete data.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=25000 --tables=250 --threads=<thread_num> oltp_common cleanup
Testing read-only performance.
- Import data.
- Create the test database sbtest.
mysql -u<user> -P<port> -h<host> -p -e "create database sbtest"
- Import the test background data to the sbtest database.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=25000 --tables=250 --threads=<thread_num> oltp_common prepare
- Create the test database sbtest.
- Test the read-only performance. The process takes about 10 minutes.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=25000 --tables=250 --time=600 --range_selects=0 --skip-trx=1 --threads=<thread_num> --percentile=95 --report-interval=1 oltp_read_only run
- Delete data.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=25000 --tables=250 --threads=<thread_num> oltp_common cleanup
Testing read/write performance:
- Import data.
- Create the test database sbtest.
mysql -u<user> -P<port> -h <host> -p -e "create database sbtest"
- Import the test background data to the sbtest database.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=250000 --tables=25 --threads=<thread_num> oltp_common prepare
- Create the test database sbtest.
- Test the read and write performance. The process takes about 10 minutes.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=250000 --tables=25 --time=600 --threads=<thread_num> --percentile=95 --report-interval=1 oltp_read_write run
- Delete data.
sysbench --db-driver=mysql --mysql-host=<host> --mysql-port=<port> --mysql-user=<user> --mysql-password=<password> --mysql-db=sbtest --table_size=250000 --tables=25 --threads=<thread_num> oltp_common cleanup
Test Metric
- Transactions per second (TPS) indicates the number of transactions executed per second.
- Queries per second (QPS) indicates the number of SQL statements, including INSERT, SELECT, UPDATE, and DELETE statements, executed per second.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.