Xpand Storage Engine
MariaDB Enterprise Server 10.5 introduces MariaDB Xpand, which provides distributed SQL, high availability, fault tolerance, write scaling, and horizontal scale-out for transactional workloads with MariaDB Enterprise Server. MariaDB Xpand consists of the Xpand storage engine and the MariaDB Xpand service.
Overview
MariaDB Xpand provides distributed SQL with the MariaDB Xpand service and the Xpand storage engine included with MariaDB Enterprise Server 10.5:
Xpand supports transactional workloads.
Xpand is strongly consistent.
Xpand leverages a shared-nothing architecture to efficiently execute distributed SQL.
Xpand provides high availability (HA) and fault tolerance by design.
Xpand scales out horizontally for both reads and writes.
Note
Want to use MariaDB Xpand immediately? Get Started with MariaDB Xpand.
Feature Summary
MariaDB Xpand 5.3 has the following features:
Feature |
Detail |
Resources |
---|---|---|
Storage Engine |
Xpand |
|
Availability |
ES10.5 |
|
Workload Optimization |
Distributed SQL |
|
Table Orientation |
Row |
|
Default Row Format |
N/A |
|
ACID-compliant |
Yes |
|
XA Transactions |
No |
|
Primary Keys |
Yes |
|
Auto-Increment |
Yes |
|
Sequences |
No |
|
Foreign Keys |
Yes |
|
Indexes |
Yes |
|
Secondary Indexes |
Yes |
|
Unique Indexes |
Yes |
|
Full-text Search |
No |
|
Spatial Indexes |
No |
|
Compression |
No |
|
Data-at-Rest Encryption |
No |
|
High Availability (HA) |
Yes |
|
Main Memory Caching |
Yes |
|
Transaction Logging |
Yes |
|
Garbage Collection |
Yes |
|
Online Schema changes |
Yes |
|
Non-locking Reads |
Yes |
|
Row Locking |
Yes |
More information about features can be found at MariaDB Xpand.
Usage
How to install and configure an Xpand deployment. |
|
How to administrate, operate, and troubleshoot an Xpand deployment. |
|
How to load data into Xpand. |
|
How to migrate InnoDB tables to Xpand. |
Application Design
To get the most out of MariaDB Xpand, application developers can follow some best practices. |
|
MariaDB Xpand provides causal reads by design without any extra configuration. |
|
MariaDB Xpand supports lockless reads, 2-phase locking for writes, and online schema changes. |
|
MariaDB Xpand provides excellent concurrency, which helps your application scale. |
|
MariaDB Xpand supports stored procedures and stored functions. |
|
MariaDB Xpand supports the Repeatable Read transaction isolation level. |
Schema Design
How to use AUTO_INCREMENT columns with Xpand. |
|
How to create an Xpand table. |
|
How to use foreign keys with Xpand. |
|
How to use primary keys, secondary indexes, and unique indexes wih Xpand. |
Term Definitions
Term |
Definition |
---|---|
System |
One running operating system. A system typically answers one or more IP addresses. |
Service |
One set of processes running on a system. A service typically answers one or more TCP port or UNIX socket. A service is typically started and stopped using systemd. |
Process |
One or more pid running on a system, associated with a service. A service may include one or more process. A process typically serves one or more TCP connection or socket connection. |
Node |
One service, or multiple services working in concert, on a system. |
Deployment |
One service, or more than one service connected by a multi-node technology. A deployment may operate on one system or multiple. A deployment may contain one node or multiple. |
Plugin |
A component of MariaDB Enterprise Server which may be included in the server function optionally, either at runtime or compile-time, and which adheres to an established plugin architecture within Enterprise Server. |
Multi-Node |
The case where multiple nodes exist in a deployment. |
MariaDB Enterprise Server service |
The MariaDB Enterprise Server service that runs on each node in a deployment. |
MariaDB Xpand service |
The MariaDB Xpand service that runs on each node in a deployment. |
Examples
Creating an Xpand Table
To create an Xpand table, use the CREATE TABLE statement with the ENGINE=Xpand
option:
CREATE DATABASE hq_sales;
CREATE TABLE hq_sales.invoices (
invoice_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
branch_id INT NOT NULL,
customer_id INT,
invoice_date DATETIME(6),
invoice_total DECIMAL(13, 2),
payment_method ENUM('NONE', 'CASH', 'WIRE_TRANSFER', 'CREDIT_CARD', 'GIFT_CARD'),
PRIMARY KEY(invoice_id)
) ENGINE = Xpand;
SELECT TABLE_SCHEMA, TABLE_NAME, ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA='hq_sales'
AND TABLE_NAME='invoices';
FAQ
How many nodes should my MariaDB Xpand deployment have?
A MariaDB Xpand deployment should have 3 or more nodes to provide high availability and to avoid a split-brain scenario.