Mariadb Platform X5 vs. Mysql Enterprise Edition 8: September 2020
Mariadb Platform X5 vs. Mysql Enterprise Edition 8: September 2020
PLATFORM X5
VS. MYSQL
ENTERPRISE
EDITION 8
September 2020
WHITEPAPER
TABLE OF CONTENTS
3 INTRODUCTION
4 SOFTWARE
4 COMPONENTS
4 PLUGINS
5 COMPARISON
5 DEVELOPMENT
10 SCALABILITY AND PERFORMANCE
11 HIGH AVAILABILITY
12 DISASTER RECOVERY
12 SECURITY
17 SUMMARY
18 CONCLUSION
MariaDB continues to be compatible with the MySQL protocol and MySQL clients, and has replaced MySQL in leading
Linux distributions such as Debian, Ubuntu, Fedora, Red Hat Enterprise Linux/CentOS, SUSE Linux Enterprise Server/
openSUSE and OpenBSD/FreeBSD.
However, MariaDB and MySQL have different product strategies and visions. MariaDB embraces community participation
and contributions, and while MySQL is focused on InnoDB as its primary storage engine, MariaDB continues to advance
the pluggable storage engine architecture it shares with MySQL. MariaDB brings together multiple storage engines to
support a broad set of use cases, with each engine optimized for a specific workload.
Components
MariaDB MySQL
Plugins
MariaDB MySQL
Development
JSON
MariaDB and MySQL both support JSON, and implement many of the same JSON functions. However, whereas MySQL
stores JSON documents as binary objects, MariaDB stores them as strings.
Note:
If MariaDB is configured to replicate from MySQL as part of the migration process, statement-based replication must be
used if any of the MySQL tables being replicated contain JSON columns.
Standard functions
MariaDB and MySQL both support most of the nine (9) JSON functions defined in standard SQL (SQL:2016). JSON_
TABLE is planned for the next major version of MariaDB. When it is released, MariaDB will have implemented all of the
standard SQL functions for JSON.
Note:
SQL:2016 defines the IS JSON syntax for ensuring JSON columns contain valid JSON documents, but MariaDB and MySQL
implemented JSON_VALID instead.
MariaDB MySQL
JSON_ARRAY
JSON_ARRAY_AGG
JSON_EXISTS
JSON_OBECT
JSON_OBJECT_AGG
JSON_QUERY
JSON_VALUE
JSON_TABLE
In addition the standard SQL functions for JSON, MariaDB and MySQL both support many of the same utility functions
for working with JSON documents.
• JSON_INSERT • JSON_REMOVE
Differentiating functions
However, there are some functions available in MariaDB that are not in MySQL and vice versa. MySQL 8, in particular,
introduced several notable JSON functions, including two operators as aliases/shorthands for JSON_EXTRACT (with
and without JSON_UNQUOTE) and two functions JSON Schema validation.
Note:
MariaDB’s JSON_DETAILED function and MySQL’s JSON_PRETTY function do the same thing, format JSON documents so
they are easy to read.
MariaDB MySQL
->
->>
JSON_COMPACT
JSON_DETAILED JSON_PRETTY
JSON_LOOSE
JSON_OVERLAPS
JSON_PRETTY JSON_DETAILED
JSON_SCHEMA_VALID
JSON_SCHEMA_VALIDATION_REPORT
JSON_STORAGE_FREE
JSON_STORAGE_SIZE
MEMBER OF
Schema
In terms of database objects, MariaDB 10.3 introduced sequences, invisible columns and temporal tables – all of which
are not available in MySQL.
MariaDB MySQL
Sequences
Generated columns
Invisible columns
Temporal tables
Views
Indexes
MariaDB and MySQL both support standard indexes, but MySQL 8 added support for descending, functional and
invisible indexes as well.
MariaDB MySQL
Descending
Functional
Invisible
Queries
MariaDB and MySQL both support a lot of standard SQL. MySQL 8 made progress catching up with MariaDB by adding
common table expressions (CTEs) and window functions, but does not yet support the INTERSECT and EXCEPT set
operators introduced in MariaDB 10.3
Further, they both provide extended support in different areas. MariaDB 10.5 improved its support for CTEs by adding
support for CYCLE while MySQL 8 improved its support for roll ups by adding GROUPING and allowing WITH ROLLUP
to be used with ORDER BY.
MariaDB MySQL
VALUES
GROUPING (rollups)
Aggregate functions
MariaDB and MySQL both support many of the same out-of-the-box aggregate functions. However, MariaDB supports
correlation and linear regression functions as well – MySQL does not.
MariaDB MySQL
STD
STDDEV
STDDEV_POP
STDDEV_SAMP
VARIANCE
VAR_POP
VAR_SAMP
MariaDB MySQL
CORR
COVAR_POP
COVAR_SAMP
REGR_AVGX
REGR_AVGY
REGR_COUNT
REGR_INTERCEPT
REGR_R2
REGR_SLOPE
REGR_SXX
REGR_SXY
REGR_SYY
Window functions
MariaDB and MySQL both support many of the same out-of-the-box windows functions. However, MariaDB supports
inverse distribution functions as well – MySQL does not.
Value
MariaDB MySQL
FIRST_VALUE
LAG
LAST_VALUE
LEAD
NTH_VALUE
MariaDB MySQL
CUME_DIST
DENSE_RANK
NTILE
PERCENT_RANK
RANK
ROW_NUMBER
Inverse distribution
MariaDB MySQL
MEDIAN
PERCENTILE_CONT
PERCENTILE_DISC
MaxScale performs transparent read/write splitting and adaptive load balancing, neither of which are available in
MySQL Router. In addition, MaxScale can cache query results in Redis to reduce the workload on the database and
improve query performance.
Spider enables transparent sharding and/or parallel query, giving MariaDB the ability to utilize multiple database
instances and/or multiple CPU cores per database instance to execute queries with linear scalability.
Xpand provides MariaDB with fully distributed SQL, and is capable of scaling to millions of transactions per second
with a shared-nothing architecture on commodity hardware, on premises or in the cloud. Further, Xpand is elastic,
allowing database instances to be added or removed on demand.
Table/row compression
Column compression
Log compression
Partitioning
Parallel query
Read/write splitting
Casual reads
Sharding
Distributed SQL
High availability
MariaDB and MySQL both support replication (asynchronous and semi-synchronous), but whereas MariaDB includes
automatic failover for high availability, MySQL does not. However, both MariaDB and MySQL can provide continuous
availability with multi-master clustering and dynamic query routing.
MariaDB multi-master clustering is based on Galera Cluster, a robust, mature and proven solution that’s been used
in production for years. MySQL introduced group replication in the previous major release (MySQL 5.7), but it lacks
advanced clustering features such as full state transfer for adding new database instances, automatic rejoin for
recovered database instances and streaming replication for large transactions.
MariaDB MySQL
Multi-master clustering
Connection migration
Session restore
Transaction replay
MariaDB MySQL
Online backups
Encrypted backups
Compressed backups
Point-in-time restore
Point-in-time rollback
Delayed replicas
Security
MariaDB and MySQL provide many of the same enterprise security features, but there are some differences in the
implementations and MariaDB offers more advanced features for database and data protection.
Encryption
MariaDB and MySQL both support the same core encryption features, including HashiCorp Vault plugins for external
key management.
MariaDB MySQL
Encrypted connections
MariaDB and MySQL both support the same core authentication features. However, MySQL 8 introduced password
reuse policies. This feature is not yet available in MariaDB.
MariaDB MySQL
PAM/LDAP/Kerberos/NTLM authentication
User/group mapping
Password expiration
Account locking
Authorization
MariaDB and MySQL both support the same core authorization features. However, MySQL 8 introduced partial
revokes. This feature is planned for the next major version of MariaDB.
MariaDB MySQL
Roles
Privileges
Partial revokes
MariaDB and MySQL both support auditing, but with some differences. MariaDB can write to a file or to the syslog.
MySQL can only write to a file, but supports JSON and XML formats whereas MariaDB uses a CSV format. In addition,
MySQL supports audit log compression and encryption.
MariaDB MySQL
Syslog output
Custom events
Encryption
Compression
MariaDB and MySQL both have database firewall, but MariaDB offers many more advanced database and data
protection features, including dynamic data masking to hide sensitive and/or personally identifiable information in
query results and both query throttling and query result limiting to protect the database from denial-of-service (DoS)
attacks.
MariaDB MySQL
Database firewall
Query throttling
With system-versioned tables, the database creates a new row whenever its data is modified (i.e., updated or
deleted), maintaining a complete version history of every row. It enables DBAs and/or applications to query table
data from a previous point in time.
With application-time period tables, applications specify the start and end time for when a row is valid.
Federation
The MariaDB Enterprise Federation plugin can be used to access tables in other databases through MariaDB. Unlike
similar plugins for MySQL, it is not limited to remote MariaDB databases. It access remote databases, open source or
proprietary, using standard ODBC connections.
Distributed SQL
The MariaDB Xpand plugin provides MariaDB with fully distributed SQL, enabling it to scale out to millions of
transactions per second. Xpand tables and indexes are partitioned, with different partitions stored on different
database instances, modified via distributed transactions and accessed via standard SQL. Further, Xpand is highly
available, maintaining at least three (3) copies of a partition, and elastic, automatically rebalancing data when
database instances are added and replacing lost partitions when database instances are removed.
• Column compression
• Parallel query
• Read/write splitting
• Casual reads
• Sharding
• Connection migration
• Session restore
• Transaction replay
• Query throttling
For enterprise organizations looking to embrace open source and migrate off of proprietary databases such as Oracle
Database, Microsoft SQL Server and IBM Db2, MariaDB provides the most powerful and most capable enterprise
open source alternative, complete with Oracle Database compatibility, columnar storage for scalable, high-
performance analytics and distributed SQL for scale out transaction processing.