Table Options with MariaDB Xpand
This page is part of MariaDB's Documentation.
The parent of this page is: Table DDL for MariaDB Xpand
Topics on this page:
Overview
MariaDB Xpand's table options are used in CREATE TABLE
and ALTER TABLE
statements to define table characteristics:
Xpand ignores some InnoDB-related table options in table definitions to allow easy migrations from InnoDB
Xpand accepts the
REPLICAS
table option to provide an increased level of fault tolerance for a given table
Compatibility
MariaDB Xpand 5.3
MariaDB Xpand 6.0
MariaDB Xpand 6.1
Table Options with CREATE TABLE
To set table options for a new table with MariaDB Xpand, set the table options in the CREATE TABLE statement:
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)
) SLICES=6;
Table Options with ALTER TABLE
To set table options for an existing table with MariaDB Xpand, set the table options in the ALTER TABLE statement:
ALTER TABLE hq_sales.invoices
REPLICAS=ALLNODES;
Accepted Table Options
MariaDB Xpand supports the following table options:
Table Option | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
| |
| |
|
|
|
|
|
|
| |
| |
|
|
Ignored Table Options
MariaDB Xpand ignores the following table options to allow easy migrations from MariaDB Server and MySQL:
CHECKSUM
CONNECTION
DELAY_KEY_WRITE
INSERT_METHOD
KEY_BLOCK_SIZE
MAX_ROWS
MIN_ROWS
PACK_KEYS
PAGE_CHECKSUM
PASSWORD
ROW_FORMAT
TABLESPACE
UNION