§ GreatSQL User Manual (English)

GreatSQL: Official SiteGreatSQLOfficial Site GreatSQL: ForumGreatSQLForum GreatSQL: BlogGreatSQLBlog License: GPL v2.0LicenseGPL v2.0 release: 8.4.4 4release8.4.4 4

This is the English edition of the GreatSQL 8.4.4-4 User Manual. The Chinese edition is available at Chinese User Manual.

Last updated: 2026-11-25.

This document applies to: GreatSQL 8.4.4-4.

§ 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.

GreatSQL LOGO

§ Download GreatSQL

§ Core Features

§ High Availability

GreatSQL makes extensive improvements and enhancements to MGR (Group Replication) and primary-secondary replication, supporting features such as zone tags, arbitrator nodes, dynamic read/write VIP, fast single-primary mode, and smart primary election. In addition, it deeply optimizes several underlying MGR working mechanisms and algorithms, including the flow control algorithm, the transaction certification queue cleanup algorithm, the node join/leave mechanism, the recovery mechanism, and large transaction transfer compression, further improving the high availability guarantee and performance stability of MGR.

  • Supports the zone tag feature to improve data reliability in multi-data-center architectures.
  • Supports the arbitrator node feature to achieve higher availability at lower server cost.
  • Supports the dynamic read/write VIP feature, making high availability switchover more convenient and achieving read load balancing faster. Supports proactively disconnecting active connections when the primary node is switched to shorten application unavailability time.
  • Supports the fast single-primary mode, which is faster and delivers higher performance in single-primary mode.
  • Supports the smart primary election feature, making the primary election mechanism in high availability switchover more reasonable.
  • Optimizes the flow control algorithm to make transactions more stable and avoid severe jitter.
  • Supports recording events when MGR network communication overhead exceeds the threshold for further analysis and optimization.
  • Supports automatically selecting the member node with the most recent transaction data as the data source, effectively improving Clone speed and enhancing MGR service reliability.
  • In primary-secondary replication, supports rate limiting when a secondary node issues Binlog read requests to the primary node.
  • Optimizes the fault detection efficiency in asynchronous connection failover (opens new window), reducing the time the primary-secondary replication link is disconnected and improving overall availability.
  • Supports the loop prevention mechanism in primary-primary bidirectional replication in cross-data-center disaster recovery scenarios.
  • Optimizes the severe performance jitter that may occur when MGR nodes join or leave.
  • Resolves the issue where the entire MGR cluster is blocked when an individual node's disk becomes full.
  • Optimizes the MGR transaction certification queue cleanup algorithm, eliminating the 60-second performance jitter under high load.
  • Resolves the issue where long transactions in MGR prevent primary election.
  • Fixes the long-waiting issue during the MGR recovery process.
  • Optimizes the handling mechanism when compression exceeds the limit during large transaction transfer in MGR.

For more information, see: High Availability.

§ High Performance

Compared with MySQL and Percona Server for MySQL, GreatSQL delivers more stable and superior performance. It supports the Rapid Engine, Turbo Engine, lock-free transactions, parallel LOAD DATA, asynchronous deletion of large tables, thread pool, non-blocking DDL, NUMA affinity scheduling optimization, and more. In TPC-C benchmarks it outperforms MySQL by more than 30%, and in TPC-H benchmarks its performance is ten to even a hundred times that of MySQL.

  • Supports the high-performance Rapid Engine with massively parallel, in-memory queries and a high compression ratio, which can improve data analysis performance by several orders of magnitude.
  • Supports the high-performance parallel query engine Turbo, giving GreatSQL multi-threaded concurrent vectorized real-time query capabilities.
  • Optimizes the InnoDB transaction system with multiple optimizations such as big-lock splitting and lock-free design, improving overall OLTP performance by about 20%.
  • Supports parallel LOAD DATA, suitable for scenarios that frequently import large batches of data, with performance improvements of over 20x; it also provides optimizations for scenarios without an explicitly defined primary key.
  • Supports asynchronous deletion of large tables to improve the runtime performance stability of the InnoDB engine.
  • Supports the thread pool, reducing the cost of thread creation and destruction and ensuring stable performance under high concurrency without obvious degradation.
  • Supports non-blocking DDL, avoiding the problem of business requests being massively blocked because the database must complete DDL operations as quickly as possible.
  • Supports NUMA affinity optimization. Through NUMA affinity scheduling, front-end user threads and background threads are bound to fixed NUMA nodes to improve thread processing performance.

For more information, see: High Performance.

§ High Compatibility

GreatSQL is 100% compatible with the syntax of MySQL and Percona Server for MySQL, and supports most common Oracle syntax, including data type compatibility, function compatibility, SQL syntax compatibility, stored routine compatibility, and many other compatible extensions.

For more information, see: High Compatibility.

§ High Security

GreatSQL supports multiple security enhancements, including logical backup encryption, CLONE backup encryption, auditing, tablespace encryption with national cryptographic (GM) algorithms, sensitive data masking, and login history storage, further safeguarding business data and making it more suitable for financial-grade application scenarios.

Through the above security enhancements, business data security is further safeguarded. For more information, see: High Security.

§ Others

§ Installing GreatSQL

Running GreatSQL with jemalloc support makes the memory allocation of the database process more stable and efficient, so it is recommended to install jemalloc (not mandatory).

On ARM environments, it is not necessary to install and configure the jemalloc dependency.

Taking a CentOS 8 x86_64 system 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
1
2
3
4
5

You can also add the path of a self-compiled dynamic library (so file) to the system configuration file, for example:

cat /etc/ld.so.conf
/usr/local/lib64/
1
2

Then run the following commands to load the libjemalloc library and verify that it exists:

ldconfig && ldconfig -p | grep libjemalloc
1
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
1
2
3
4
5

If jemalloc cannot be installed directly via yum, you can download the RPM package yourself from: 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 packages is recommended.

Click here to download the GreatSQL RPM packages (opens new window).

Taking a CentOS 8 system 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-4.1.el8.x86_64.rpm greatsql-devel-8.4.4-4.1.el8.x86_64.rpm greatsql-icu-data-files-8.4.4-4.1.el8.x86_64.rpm greatsql-server-8.4.4-4.1.el8.x86_64.rpm greatsql-shared-8.4.4-4.1.el8.x86_64.rpm
1
2
3
4
5
6
7

Tip

When formally installing the GreatSQL RPM packages, other packages such as openssl and Perl may also be required as dependencies. For a quick demonstration, the --nodeps parameter is used here to skip the dependency checks. If the service fails to start after installation due to missing dependencies, please install the corresponding dependency packages.

After installation, GreatSQL completes initialization automatically. You can check whether it has been registered as a system service or has started:

systemctl status mysqld
1
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
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

The GreatSQL service can then be started normally.

For more efficient operation of GreatSQL, it is recommended to refer to this my.cnf configuration template: my.cnf for GreatSQL 8.4.4-4 (opens new window).

§ Compiling GreatSQL from Source

If you want to compile 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 want to compile the GreatSQL source code manually, you can refer to the following documents:

Note: You need to download the GreatSQL source package (opens new window) for compilation, rather than compiling the source code obtained by directly git clone-ing this repository, because some submodule code is missing.

§ Version History

Click here to view the GreatSQL version history.

§ GreatSQL vs MySQL

1. Core Features GreatSQL 8.4.4-4 MySQL 8.4.4
Open source ✔️ ✔️
ACID integrity ✔️ ✔️
MVCC ✔️ ✔️
Row locking ✔️ ✔️
Crash auto-recovery ✔️ ✔️
Partitioning ✔️ ✔️
Views ✔️ ✔️
Subqueries ✔️ ✔️
Triggers ✔️ ✔️
Stored programs ✔️ ✔️
Foreign keys ✔️ ✔️
Window functions ✔️ ✔️
Common Table Expressions (CTE) ✔️ ✔️
Geographic Information System (GIS) ✔️ ✔️
GTID-based replication ✔️ ✔️
Group Replication (MGR) ✔️ ✔️
MyRocks engine ✔️ ❌
LoongArch (Loongson) support ✔️ ❌
2. Performance Enhancement Extensions GreatSQL 8.4.4-4 MySQL 8.4.4
Rapid Engine ✔️ Cloud-only HeatWave
Turbo Engine ✔️ ❌
NUMA affinity optimization ✔️ ❌
Non-blocking DDL ✔️ ❌
Import optimization for tables without a primary key ✔️ ❌
Parallel LOAD DATA ✔️ ❌
InnoDB transaction ReadView lock-free optimization ✔️ ❌
InnoDB transaction big-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 ✔️ ❌
Single-column compression for VARCHAR/BLOB/JSON types ✔️ ❌
Single-column compression info stored in the 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 routines ✔️ ❌
4. Foundational Feature Enhancements GreatSQL 8.4.4-4 MySQL 8.4.4
MGR improvements - zone tags ✔️ ❌
MGR improvements - arbitrator nodes ✔️ ❌
MGR improvements - read/write node VIP binding ✔️ ❌
MGR improvements - fast single-primary mode ✔️ ❌
MGR improvements - smart primary election mechanism ✔️ ❌
MGR improvements - new flow control algorithm ✔️ ❌
MGR improvements - network partition handling ✔️ ❌
MGR improvements - abnormal node exit handling ✔️ ❌
MGR improvements - node disk-full handling ✔️ ❌
MGR improvements - automatic donor node selection ✔️ ❌
MGR improvements - 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 info ✔️ ❌
Enhanced temporary table info ✔️ ❌
Enhanced user statistics ✔️ ❌
Enhanced Slow log info ✔️ ❌
5. Security Enhancements GreatSQL 8.4.4-4 MySQL 8.4.4
National cryptography (GM) 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. Operational Convenience Enhancements GreatSQL 8.4.4-4 MySQL 8.4.4
DDL atomicity ✔️ ✔️
Data dictionary stores InnoDB tables ✔️ ✔️
Fast DDL ✔️ ✔️
SET PERSIST ✔️ ✔️
Invisible indexes ✔️ ✔️
Thread pool ✔️ Enterprise Edition only
Backup lock ✔️ ❌
Extended SHOW GRANTS ✔️ ❌
Extended table corruption actions ✔️ ❌
Kill inactive transactions ✔️ ❌
Extended START TRANSACTION WITH CONSISTENT SNAPSHOT ✔️ ❌

GreatSQL 8.4.4-4 is based on Percona Server for MySQL 8.4.4-4, which incorporates extensive improvements, enhancements, and many new features on top of MySQL 8.4.4. See the Percona Server for MySQL feature comparison (opens new window) for details. These include features only available in MySQL Enterprise Edition, such as the thread pool, auditing, and data masking, as well as numerous improvements such as performance_schema enhancements, information_schema enhancements, performance and scalability improvements, enhanced user statistics, enhanced PROCESSLIST, and enhanced Slow Log, which are not all repeated here.

GreatSQL is also a GVP (Gitee Most Valuable Project) project on the Gitee platform. See the database-related category: https://gitee.com/gvp/database-related (opens new window).

§ Licensing

GreatSQL is committed to maintaining the openness of open source. GreatSQL is licensed under the GPLv2 license.

Scan the QR code to follow our WeChat Official Account

greatsql-wx