§ Key Features
GreatSQL is an open source and free database that can meet financial-grade application scenarios on commodity hardware. It features High Availability, High Performance, High Compatibility, and High Security, and can serve as an ideal drop-in replacement for MySQL or Percona Server for MySQL.
§ Core Features
§ High Availability
GreatSQL has made numerous improvements and enhancements to MGR, supporting features such as zone id, arbitrator, dynamic read/write VIP, fast single-primary mode, and smart primary election. It also deeply optimizes several underlying MGR working mechanisms and algorithms, including the flow control algorithm, transaction certification queue cleanup algorithm, member join/leave mechanism, and recovery mechanism, further improving MGR's high availability guarantee and performance stability.
- Supports the zone id feature to improve data reliability in multi-site architectures.
- Supports the arbitrator feature, achieving higher availability at lower server cost.
- Supports the dynamic read/write VIP feature, making high availability switchover more convenient and read load balancing faster. Supports actively closing current active connections when the primary switches to shorten application-side unavailability.
- Supports fast single-primary mode, which is faster and delivers higher performance in single-primary mode.
- Supports smart primary election, making the primary election mechanism during HA switchover more reasonable.
- Optimizes the flow control algorithm to make transactions smoother and avoid severe jitter.
- Supports recording events where MGR network communication overhead exceeds the threshold for further analysis and optimization.
- Supports a loop prevention mechanism in primary-primary bidirectional replication for cross-site disaster recovery scenarios.
- Optimizes the problem of severe performance jitter that may occur when members join or leave.
- Resolves the issue where the entire MGR cluster is blocked when disk space on a member is exhausted.
- Optimizes the transaction certification queue cleanup algorithm, eliminating the performance jitter every 60 seconds under high load.
- Resolves the issue where long-running transactions prevent primary election.
- Fixes the long waiting time during the recovery process.
For more information, see the document: High Availability.
§ High Performance
Relative to MySQL and Percona Server for MySQL, GreatSQL delivers more stable and superior performance. It supports features such as Rapid Engine, lock-free transactions, parallel LOAD DATA, asynchronous drop of large tables, thread pool, non-blocking DDL, and NUMA affinity scheduling optimization. In TPC-C tests, performance is improved by more than 30% compared with MySQL, and in TPC-H tests, performance is tens or even hundreds of times that of MySQL.
- Supports the Rapid Engine, a high-performance engine featuring massive parallelism, in-memory queries, and a high compression ratio, which can improve data analysis performance by several orders of magnitude.
- Optimizes the InnoDB transaction system with various optimizations such as splitting big locks and lock-free design, improving overall OLTP performance by about 20%.
- Supports parallel LOAD DATA, suitable for applications that frequently import large batches of data, improving performance by more than 20 times; it also provides optimizations for scenarios without an explicitly defined primary key.
- Supports asynchronous drop of large tables, improving the runtime performance stability of the InnoDB engine.
- Supports thread pool, reducing the cost of thread creation and destruction and ensuring stable performance without obvious degradation under high concurrency.
- Supports non-blocking DDL, avoiding the problem of a large number of business requests being blocked because DDL operations must be completed as soon as possible.
- Supports NUMA affinity optimization, binding front-end user threads and background threads to fixed NUMA nodes through NUMA affinity scheduling optimization to improve thread processing performance.
For more information, see the document: High Performance.
§ High Compatibility
GreatSQL is 100% compatible with MySQL and Percona Server for MySQL usage and supports most common Oracle usage, including data type compatibility, function compatibility, SQL syntax compatibility, stored routine compatibility, and many other compatibility extensions.
For more information, see the document: High Compatibility.
§ High Security
GreatSQL supports multiple security enhancement features such as logical backup encryption, Clone backup encryption, auditing, national cryptographic tablespace encryption, and sensitive data masking, further safeguarding business data security and making it more suitable for financial-grade application scenarios.
- Supports mysqldump logical backup encryption, providing a secure encryption solution for logical backups made with mysqldump.
- Supports Clone backup encryption, providing a secure encryption solution for physical backups made with Clone.
- Supports the auditing feature to record and detect unauthorized or unsafe behavior in a timely manner.
- Supports national cryptographic encryption algorithms for InnoDB tablespaces, ensuring the encryption security of important data.
- Supports two data masking approaches based on functions and policies to protect the confidentiality of query results for sensitive user data.
Through the multiple security enhancement features above, business data security is further safeguarded. For more information, see the document: High Security.
§ Others
- Supports Clone online full hot backup, incremental backup, and restore. Combined with the binary log, this enables recovery to a specified point in time. In addition, Clone backup supports compression.
§ GreatSQL vs MySQL
| 1. Major Features | GreatSQL 8.4.4-4 | MySQL 8.4.4 |
|---|---|---|
| Open Source | ✔️ | ✔️ |
| ACID Integrity | ✔️ | ✔️ |
| MVCC Features | ✔️ | ✔️ |
| Row Locks Supported | ✔️ | ✔️ |
| Automatic Crash Recovery | ✔️ | ✔️ |
| Table Partitioning | ✔️ | ✔️ |
| Views | ✔️ | ✔️ |
| Subqueries | ✔️ | ✔️ |
| Triggers | ✔️ | ✔️ |
| Stored Programs | ✔️ | ✔️ |
| Foreign Keys | ✔️ | ✔️ |
| Window Functions | ✔️ | ✔️ |
| Common Table Expressions (CTE) | ✔️ | ✔️ |
| Geographic Information (GIS) | ✔️ | ✔️ |
| GTID-Based Replication | ✔️ | ✔️ |
| Group Replication (MGR) | ✔️ | ✔️ |
| MyRocks Engine | ✔️ | ❌ |
| LoongArch Architecture Support | ✔️ | ❌ |
| 2. Performance Enhancement Extensions | GreatSQL 8.4.4-4 | MySQL 8.4.4 |
| Rapid Engine | ✔️ | HeatWave (cloud only) |
| Turbo Engine | ✔️ | ❌ |
| NUMA Affinity Optimization | ✔️ | ❌ |
| Non-Blocking DDL | ✔️ | ❌ |
| Accelerated Import for Tables Without Primary Key | ✔️ | ❌ |
| Parallel LOAD DATA | ✔️ | ❌ |
| InnoDB Transaction ReadView Lock-Free Optimization | ✔️ | ❌ |
| InnoDB Transaction Large Lock Splitting Optimization | ✔️ | ❌ |
| InnoDB Resource Groups | ✔️ | ✔️ |
| Custom InnoDB Page Size | ✔️ | ✔️ |
| Contention-Aware Transaction Scheduling | ✔️ | ✔️ |
| InnoDB Mutexes Splitting Optimization | ✔️ | ❌ |
| MEMORY Engine Optimization | ✔️ | ❌ |
| InnoDB Flushing Optimization | ✔️ | ❌ |
| Parallel Doublewrite Buffer | ✔️ | ✔️ |
| InnoDB Fast Index Creation Optimization | ✔️ | ❌ |
| Single-Column Compression for VARCHAR/BLOB/JSON Types | ✔️ | ❌ |
| Single-Column Compression Information in Data Dictionary | ✔️ | ❌ |
| 3. Developer-Oriented Improvements | GreatSQL 8.4.4-4 | MySQL 8.4.4 |
| X API | ✔️ | ✔️ |
| JSON | ✔️ | ✔️ |
| NoSQL Socket-Level Interface | ✔️ | ✔️ |
| InnoDB Full-Text Search Improvements | ✔️ | ❌ |
| More Hash/Digest Functions | ✔️ | ❌ |
| Oracle Compatibility - Data Types | ✔️ | ❌ |
| Oracle Compatibility - Functions | ✔️ | ❌ |
| Oracle Compatibility - SQL Syntax | ✔️ | ❌ |
| Oracle Compatibility - Stored Programs | ✔️ | ❌ |
| 4. Basic Feature Enhancements | GreatSQL 8.4.4-4 | MySQL 8.4.4 |
| MGR Enhancement - Zone Tags | ✔️ | ❌ |
| MGR Enhancement - Arbitrator Nodes | ✔️ | ❌ |
| MGR Enhancement - VIP Binding for Read/Write Nodes | ✔️ | ❌ |
| MGR Enhancement - Fast Single-Primary Mode | ✔️ | ❌ |
| MGR Enhancement - Smart Primary Election Mechanism | ✔️ | ❌ |
| MGR Enhancement - New Flow Control Algorithm | ✔️ | ❌ |
| MGR Enhancement - Automatic Donor Node Selection | ✔️ | ❌ |
| Clone Full & Incremental Backup | ✔️ | ❌ |
| Clone Backup Compression | ✔️ | ❌ |
| Number of information_schema tables | 95 | 65 |
| Global performance and status metrics | 853 | 434 |
| Optimizer Histograms | ✔️ | ✔️ |
| Per-Table Performance Metrics | ✔️ | ❌ |
| Per-Index Performance Metrics | ✔️ | ❌ |
| Per-User Performance Metrics | ✔️ | ❌ |
| Per-Client Performance Metrics | ✔️ | ❌ |
| Per-Thread Performance Metrics | ✔️ | ❌ |
| Global Query Response Time Statistics | ✔️ | ❌ |
| SHOW ENGINE INNODB STATUS Enhancement | ✔️ | ❌ |
| Rollback Segment Information Enhancement | ✔️ | ❌ |
| Temporary Table Information Enhancement | ✔️ | ❌ |
| User Statistics Enhancement | ✔️ | ❌ |
| Slow Query Log Enhancement | ✔️ | ❌ |
| 5. Security Enhancements | GreatSQL 8.4.4-4 | MySQL 8.4.4 |
| National Cryptographic Algorithm Support | ✔️ | ❌ |
| Backup Encryption | ✔️ | ❌ |
| Auditing | ✔️ | Enterprise Edition only |
| Data Masking | ✔️ | ❌ |
| SQL Roles | ✔️ | ✔️ |
| SHA-2 Password Hashing | ✔️ | ✔️ |
| Password Rotation Policy | ✔️ | ✔️ |
| PAM Authentication Plugin | ✔️ | Enterprise Edition only |
| Keyring Stored in File | ✔️ | ✔️ |
| Keyring Stored in Hashicorp Vault | ✔️ | Enterprise Edition only |
| InnoDB Data Encryption | ✔️ | ✔️ |
| InnoDB Log Encryption | ✔️ | ✔️ |
| InnoDB Tablespace File Encryption | ✔️ | ✔️ |
| Binary Log Encryption | ✔️ | ❌ |
| Temporary File Encryption | ✔️ | ❌ |
| Forced Encryption | ✔️ | ❌ |
| 6. Operations Convenience Enhancements | GreatSQL 8.4.4-4 | MySQL 8.4.4 |
| DDL Atomicity | ✔️ | ✔️ |
| Data Dictionary Stored in InnoDB Tables | ✔️ | ✔️ |
| Fast DDL | ✔️ | ✔️ |
| SET PERSIST | ✔️ | ✔️ |
| Invisible Indexes | ✔️ | ✔️ |
| Thread Pool | ✔️ | Enterprise Edition only |
| Backup Locks | ✔️ | ❌ |
| SHOW GRANTS Extension | ✔️ | ❌ |
| Table Corruption Action Extension | ✔️ | ❌ |
| Kill Inactive Transactions | ✔️ | ❌ |
| START TRANSACTION WITH CONSISTENT SNAPSHOT Extension | ✔️ | ❌ |
GreatSQL 8.4.4-4 is based on Percona Server for MySQL 8.4.4-4, which has made a large number of improvements and enhancements and added many new features on top of MySQL 8.4.4. For details, please see: Percona Server for MySQL feature comparison (opens new window). These include features only available in MySQL Enterprise Edition, such as thread pool, auditing, and data masking, as well as numerous improvements and enhancements such as performance_schema improvements, information_schema improvements, performance and scalability improvements, user statistics enhancements, PROCESSLIST enhancements, and Slow Query Log enhancements. They are not listed here one by one.
GreatSQL is also a GVP project on the gitee (code cloud) platform. For details, see the Database-related category: https://gitee.com/gvp/database-related (opens new window).
Scan to follow our official WeChat account
