§ GreatSQL User Manual (English)
This is the English edition of the GreatSQL 8.4.4-5 User Manual. The Chinese edition is available at Chinese User Manual.
Last updated: 2026-11-25.
Documentation applies to: GreatSQL 8.4.4-5.
§ About GreatSQL
GreatSQL is an open-source and free database that meets the requirements of 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.
§ Download GreatSQL
- Download the latest GreatSQL release (opens new window)
- Download historical GreatSQL releases (opens new window)
§ Core Features
§ High Availability
GreatSQL makes many improvements and enhancements to MGR (Group Replication) and primary-secondary replication. It supports zone tags, arbitrator nodes, dynamic read/write VIP, fast single-primary mode, smart primary election, and deeply optimizes several underlying MGR mechanisms and algorithms — including flow control, transaction certification queue cleanup, node join/leave mechanisms, recovery mechanisms, and large transaction transfer compression — further improving MGR high-availability guarantees and performance stability.
- Supports zone tags, improving data reliability in multi-datacenter architectures.
- Supports arbitrator nodes, achieving higher availability at lower server cost.
- Supports dynamic read/write VIP, making high-availability failover more convenient and read load balancing faster. Supports actively terminating active connections when the primary node fails over, shortening the application-side downtime.
- Supports fast single-primary mode, which is faster and more performant in single-primary mode.
- Supports smart primary election, making the failover primary election mechanism more reasonable.
- Optimizes the flow control algorithm to make transactions smoother and avoid severe jitter.
- Supports recording events where MGR network communication overhead exceeds a threshold, for further analysis and optimization.
- Supports automatically selecting the member node with the most up-to-date transaction data for cloning, effectively improving Clone speed and MGR service reliability.
- In primary-secondary replication, supports rate limiting when a secondary node requests Binlog reads from the primary node.
- Optimizes fault detection efficiency in asynchronous connection failover (opens new window), reducing replication link downtime and improving overall availability.
- Supports a loop-prevention mechanism for primary-primary bidirectional replication in cross-datacenter disaster recovery scenarios.
- Compatible with the full set of legacy replication syntax —
CHANGE MASTER TO,START SLAVE, etc. — along with their status variables and error messages. This resolves the errors caused by old replication management statements after upgrading from lower versions to 8.4, greatly reducing the workload of major version upgrades. - Optimizes the severe performance jitter that could occur when MGR nodes join or leave.
- Fixes the issue where the entire MGR cluster could be blocked when disk space on one node runs out.
- Optimizes the MGR transaction certification queue cleanup algorithm; the performance jitter every 60 seconds under high load no longer occurs.
- Fixes the issue where long transactions in MGR could prevent primary election.
- Fixes the long wait issue during MGR recovery.
- Optimizes the handling mechanism when large transaction transfer compression exceeds the limit in MGR.
See the High Availability document for more details.
§ High Performance
Compared with MySQL and Percona Server for MySQL, GreatSQL delivers more stable and better performance. It supports the Rapid Engine, Turbo Engine, lock-free transactions, parallel LOAD DATA, asynchronous large-table drops, thread pool, non-blocking DDL, NUMA affinity scheduling optimization and more. In TPC-C benchmarks, performance is improved by over 30% compared with MySQL, and in TPC-H benchmarks it is dozens or even hundreds of times faster than MySQL.
- Supports the Rapid Engine — massively parallel, memory-based queries with a high compression ratio, which can improve data analytics performance by several orders of magnitude.
- Supports the Turbo high-performance parallel query engine, giving GreatSQL multi-threaded, concurrent, vectorized real-time query capability. It also supports vector similarity search with the Turbo Engine.
- Supports independent flush optimization for large-transaction binlog, which can reduce large-transaction commit latency by 30%–70% and improve high-concurrency TPS by 10%–40%, ensuring system stability.
- Optimizes the parallel replica replay mechanism on secondary nodes in primary-secondary/group replication, effectively reducing scheduling stalls, increasing secondary-side parallel replay throughput, lowering replication lag, and strengthening cluster high-availability stability.
- Supports execution plan change anomaly detection at the SQL Digest level, continuously collecting and caching execution plan baseline information, identifying plan changes and suspicious SQL through differential comparison, and solving problems such as invisible execution plan drift after database restart/upgrade.
- Optimizes the InnoDB transaction system with large-lock splitting and lock-free designs, improving overall OLTP performance by about 20%.
- Supports parallel LOAD DATA, suitable for applications that frequently import large volumes of data, with performance gains of about 20×; there are also optimizations for tables without an explicitly defined primary key.
- Supports asynchronous deletion of large tables, improving the runtime stability of the InnoDB engine.
- Supports thread pool, reducing the cost of thread creation and destruction and keeping performance stable without significant degradation under high concurrency.
- Supports non-blocking DDL, avoiding large numbers of business requests being blocked because DDL must complete as quickly as possible.
- Supports NUMA affinity optimization, binding front-end user threads and background threads to fixed NUMA nodes to improve thread processing performance.
See the High Performance document for more details.
§ High Compatibility
GreatSQL is 100% compatible with MySQL and Percona Server for MySQL syntax and supports most common Oracle syntax, including data type compatibility, function compatibility, SQL syntax compatibility and stored routine compatibility, along with many other extended compatibility features.
See the High Compatibility document for more details.
§ High Security
GreatSQL supports multiple security enhancement features — logical backup encryption, CLONE backup encryption, auditing, GMSSL national cryptography tablespace encryption, sensitive data masking, login history storage, and more — further protecting business data and making GreatSQL better suited to financial-grade application scenarios.
- Supports mysqldump logical backup encryption, meeting the encryption requirements of logical backups with mysqldump.
- Supports Clone backup encryption, meeting the encryption requirements of physical backups with Clone.
- Supports auditing, promptly recording and detecting unauthorized or unsafe behavior.
- Supports GMSSL national cryptography encryption for InnoDB tablespaces, ensuring encrypted security of important data.
- Supports two data masking approaches based on functions and policies, protecting the confidentiality of query results for sensitive user data.
Through the security enhancement features above, business data security is further protected. See the High Security document for more details.
§ Others
- Supports Clone online full hot backup, incremental backup and recovery; combined with Binlog, recovery to a specified point in time is possible. In addition, Clone backups support compression.
- Supports InnoDB Page transparent compression using the Zstd algorithm, further improving the data compression ratio, especially when there is a large amount of duplicated long-text data.
- Supports the mysqlbinlog display of the actual number of affected rows feature: with the
-vvvoption, the output ofmysqlbinlogadditionally shows the actualaffected rowsper transaction, enhancing the observability of binlog parsing and operational statistics.
§ Install GreatSQL
§ Install jemalloc (Recommended)
When jemalloc support is available, the memory allocation of the database process is more stable and efficient, so installing jemalloc is recommended (though not mandatory).
On ARM environments, installing and configuring the jemalloc dependency is unnecessary.
Taking CentOS 8 x86_64 as an example, install the jemalloc package as follows:
# First install the EPEL repository
yum install -y epel-release
# Then install jemalloc
yum -y install jemalloc jemalloc-devel
2
3
4
5
You can also add the path of a self-installed dynamic library (.so) file to the system configuration file, for example:
cat /etc/ld.so.conf
/usr/local/lib64/
2
Then run the following commands to load the libjemalloc library and verify it exists:
ldconfig && ldconfig -p | grep libjemalloc
View the output
$ ldconfig && ldconfig -p | grep libjemalloc
...
libjemalloc.so.1 (libc6,x86-64) => /usr/local/lib64/libjemalloc.so.1
libjemalloc.so (libc6,x86-64) => /usr/local/lib64/libjemalloc.so
2
3
4
5
If jemalloc cannot be installed directly via yum, you can download the RPM package yourself: https://centos.pkgs.org/8/epel-x86_64/jemalloc-5.2.1-2.el8.x86_64.rpm.html (opens new window)
§ Download and Install GreatSQL
Installing the GreatSQL RPM package is recommended.
Click this link to download the GreatSQL RPM package (opens new window).
Taking CentOS 8 as an example, install GreatSQL with commands similar to the following:
# First, check whether GreatSQL is already installed
yum search greatsql
...
No matches found.
# Then install
rpm -ivh --nodeps greatsql-client-8.4.4-5.1.el8.x86_64.rpm greatsql-devel-8.4.4-5.1.el8.x86_64.rpm greatsql-icu-data-files-8.4.4-5.1.el8.x86_64.rpm greatsql-server-8.4.4-5.1.el8.x86_64.rpm greatsql-shared-8.4.4-5.1.el8.x86_64.rpm
2
3
4
5
6
7
Tip
When installing the GreatSQL RPM package for real, additional packages such as openssl and Perl
may be required. This is only a quick demonstration, so the --nodeps parameter is used to skip
the dependency checks. If the service cannot start after installation due to missing dependencies,
install the required dependency packages accordingly.
After installation, GreatSQL completes initialization by itself. You can then check whether it has been registered as a system service or has already started:
systemctl status mysqld
View the output
$ systemctl status mysqld
...
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
...
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 1137698 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 1137732 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 149064)
Memory: 336.7M
CGroup: /system.slice/mysqld.service
└─1137732 /usr/sbin/mysqld
...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
The GreatSQL service can now start normally.
For more efficient GreatSQL operation, it is recommended to refer to this my.cnf configuration template: my.cnf for GreatSQL 8.4.4-5 (opens new window).
§ Build GreatSQL from Source
If you want to build binary packages from the GreatSQL source code, you can use the GreatSQL-Build Docker image. See GreatSQL-Build Docker image (opens new window).
If you prefer to build the GreatSQL source code manually, refer to the following documents:
- Build and install GreatSQL from source on CentOS (opens new window)
- Build GreatSQL RPM packages on CentOS (opens new window)
- Build GreatSQL binaries on openEuler, Anolis OS and UOS (opens new window)
- Build and install GreatSQL from source on Kylin OS + Loongson (opens new window)
Reminder: you must build from the downloaded GreatSQL source package (opens new window) rather than directly cloning this repository with git clone, because some submodule code would be missing.
§ Release History
Click here for the GreatSQL release history.
§ GreatSQL vs MySQL
| 1. Core Features | GreatSQL 8.4.4-5 | MySQL 8.4.4 |
|---|---|---|
| Open source | ✔️ | ✔️ |
| ACID compliance | ✔️ | ✔️ |
| MVCC | ✔️ | ✔️ |
| Row-level locking | ✔️ | ✔️ |
| Automatic crash recovery | ✔️ | ✔️ |
| Partitioning | ✔️ | ✔️ |
| Views | ✔️ | ✔️ |
| Subqueries | ✔️ | ✔️ |
| Triggers | ✔️ | ✔️ |
| Stored Programs | ✔️ | ✔️ |
| Foreign Keys | ✔️ | ✔️ |
| Window Functions | ✔️ | ✔️ |
| Common Table Expressions (CTE) | ✔️ | ✔️ |
| GIS | ✔️ | ✔️ |
| GTID-based replication | ✔️ | ✔️ |
| Group Replication (MGR) | ✔️ | ✔️ |
| MyRocks Engine | ✔️ | ❌ |
| Loongson architecture support | ✔️ | ❌ |
| 2. Performance Enhancements | GreatSQL 8.4.4-5 | MySQL 8.4.4 |
| Rapid Engine | ✔️ | Cloud-only HeatWave |
| Turbo Engine | ✔️ | ❌ |
| NUMA affinity optimization | ✔️ | ❌ |
| Non-blocking DDL | ✔️ | ❌ |
| Import optimization for tables without primary keys | ✔️ | ❌ |
| Parallel LOAD DATA | ✔️ | ❌ |
| InnoDB transaction ReadView lock-free optimization | ✔️ | ❌ |
| InnoDB transaction large-lock splitting optimization | ✔️ | ❌ |
| InnoDB page compression with zstd | ✔️ | ❌ |
| 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 | ✔️ | ❌ |
| Per-column compression for VARCHAR/BLOB/JSON storage | ✔️ | ❌ |
| Per-column compression info stored in data dictionary | ✔️ | ❌ |
| 3. Developer-Oriented Enhancements | GreatSQL 8.4.4-5 | 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 routines | ✔️ | ❌ |
| 4. Foundation Enhancements | GreatSQL 8.4.4-5 | MySQL 8.4.4 |
| MGR – zone tags | ✔️ | ❌ |
| MGR – arbitrator nodes | ✔️ | ❌ |
| MGR – read/write node VIP binding | ✔️ | ❌ |
| MGR – fast single-primary mode | ✔️ | ❌ |
| MGR – smart primary election | ✔️ | ❌ |
| MGR – new flow control algorithm | ✔️ | ❌ |
| MGR – network partition anomaly handling | ✔️ | ❌ |
| MGR – node abnormal exit handling | ✔️ | ❌ |
| MGR – node disk full handling | ✔️ | ❌ |
| MGR – automatic donor selection | ✔️ | ❌ |
| MGR – large transaction compression optimization | ✔️ | ❌ |
| Clone incremental backup | ✔️ | ❌ |
| Clone backup compression | ✔️ | ❌ |
| Binlog read rate limiting | ✔️ | ❌ |
| 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 | ✔️ | ❌ |
| Enhanced SHOW ENGINE INNODB STATUS | ✔️ | ❌ |
| Enhanced rollback segment information | ✔️ | ❌ |
| Enhanced temporary table information | ✔️ | ❌ |
| Enhanced user statistics | ✔️ | ❌ |
| Enhanced slow log information | ✔️ | ❌ |
| 5. Security Enhancements | GreatSQL 8.4.4-5 | MySQL 8.4.4 |
| GMSSL national cryptography 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 in file storage | ✔️ | ✔️ |
| Keyring in Hashicorp Vault | ✔️ | Enterprise edition only |
| InnoDB data encryption | ✔️ | ✔️ |
| InnoDB log encryption | ✔️ | ✔️ |
| InnoDB tablespace file encryption | ✔️ | ✔️ |
| Binary log encryption | ✔️ | ❌ |
| Temporary file encryption | ✔️ | ❌ |
| Mandatory encryption | ✔️ | ❌ |
| 6. Ops Convenience Enhancements | GreatSQL 8.4.4-5 | MySQL 8.4.4 |
| DDL atomicity | ✔️ | ✔️ |
| Data dictionary in InnoDB tables | ✔️ | ✔️ |
| Fast DDL | ✔️ | ✔️ |
| SET PERSIST | ✔️ | ✔️ |
| Invisible indexes | ✔️ | ✔️ |
| Thread pool | ✔️ | Enterprise edition only |
| Backup locks | ✔️ | ❌ |
| SHOW GRANTS extensions | ✔️ | ❌ |
| Table corruption action extensions | ✔️ | ❌ |
| Kill idle transactions | ✔️ | ❌ |
| START TRANSACTION WITH CONSISTENT SNAPSHOT extensions | ✔️ | ❌ |
GreatSQL 8.4.4-5 is based on Percona Server for MySQL 8.4.4-5, which itself includes many improvements and new features on top of MySQL 8.4.4. For details, see Percona Server for MySQL feature comparison (opens new window), including features available only in MySQL Enterprise Edition such as thread pool, auditing and data masking, as well as numerous improvements like performance_schema enhancements, information_schema enhancements, performance and scalability improvements, enhanced user statistics, PROCESSLIST enhancements and Slow Log enhancements — these are not repeated here.
GreatSQL is also a GVP (Gitee Valuable Project) on the gitee platform. See the Database-related category at https://gitee.com/gvp/database-related (opens new window).
§ Licensing
GreatSQL is committed to keeping open source open. GreatSQL is released under the GPLv2 license.
Scan the QR code to follow our WeChat official account
