What's New in MariaDB Xpand 6?
This page is part of MariaDB's MariaDB Documentation.
The parent of this page is: What's New?
Topics on this page:
MariaDB Xpand 6 provides support for columnar indexes, which can be used to speed up performance of OLAP-style queries.
Columnar indexes can improve performance of ad-hoc queries, where the fields in a query are not known in advance, because Columnar indexes provide efficient filtration capabilities that are not dependent on column order.
Columnar indexes can improve performance of operational analytics, where real-time analytics are performed on transactional data, because Columnar indexes outperform row-based secondary indexes for analytical queries that perform range scans and aggregations.
Columnar indexes are compressed automatically.
A single Columnar index can be created for each table.
Single column and composite (multi-column) Columnar indexes can be defined.
To add a Columnar index to an existing table, execute
ALTER TABLE .. ADD COLUMNAR INDEX:
ALTER TABLE hq_sales.invoices ADD COLUMNAR INDEX cols (invoice_date, invoice_total);
For best performance, MariaDB recommends loading data into the table prior to adding a Columnar index.
cost_read_columnsystem variable is used for costing columnar reads. The default value of
cost_read_columnin Xpand 5.3 was
0.01. For deployments upgrading to Xpand 6 from previous versions, the value of
cost_read_columnshould be set to
For additional information, see "MariaDB Xpand Columnar Index Architecture".
In MariaDB Xpand 6, parallel replication is Generally Available (GA) and suitable for production.
Parallel replication minimizes latency and slave lag.
Parallel replication provides extremely scalable replication. When parallel replication is configured to use a specified number of parallel Slave Event Readers / Applicators, Xpand uses the consistent hashing algorithm to uniformly distribute the Slave Event Readers / Applicators between all of the nodes. The Slave Event Readers / Applicators on each node independently perform work in parallel. Each Slave Event Reader / Applicator independently streams and applies binary log events in parallel, which allows the full power of the cluster to be used without any choke points.
When parallel replication is used, MariaDB Xpand ensures transactional consistency and commits transactions in the same order as the replication primary.
Parallel replication requires row-based replication (RBR).
To configure parallel replication, execute
CREATE SLAVEand set the options for parallel replication:
CREATE SLAVE slave_name PARALLEL_LOG = master_log_name, PARALLEL_POS = position, SLICES = num_slices, BATCH_SIZE_MS = batch_size [, MASTER_HOST = master_host] [, MASTER_USER = master_user] [, MASTER_PASSWORD = master_password] [, MASTER_PORT = master_port];
For additional information, see "MariaDB Xpand Parallel Replication Architecture".
MariaDB Xpand 6 includes some improvements related to strict mode.
sql_mode=STRICT_TRANS_TABLESis set, MariaDB Xpand 6 validates when values are out of range and performs type checks on input. Errors will be raised for invalid input for all data types except:
For compatibility, MariaDB Xpand 6 adds dummy support for MariaDB Server's
Exclude Statements from Binlogs
MariaDB Xpand 6 provides a new system variable to exclude statements in the current session from being written to specific binlogs. (XPT-117)
sql_log_skip_binlogssystem variable can be set at the session-level and accepts a comma-separated list of binlog names.
To exclude the current session's statements from
binlogB, set the system variable by executing
To re-enable writes to all binlogs for the current session, set the system variable back to
Static PDs (Probability Distributions)
MariaDB Xpand 6 provides the ability to statically collect PDs (Probability Distributions).
Probability Distributions (PDs) are statistics on data distribution used to generate optimal query execution plans.
Prior to this release, all Probability Distributions were dynamic.
With this release, Static PDs allow statistics to be gathered on-demand, removing the overhead of continual statistics collection. With Static PDs, statistics can be collected off-peak and persisted indefinitely.
MariaDB Xpand 6 includes some branding-related changes to directory names, file names, and messages.
As part of re-branding efforts, some Clustrix-related files and directories have been changed to reference Xpand:
Xpand's Alerter looks for
Xpand's Upgrader uses
/etc/xpanddoesn't exist, the upgrader will print instructions on how to create a symbolic link to from
/etc/xpand, and the upgrade will be aborted.
Once a symbolic link exists, the upgrade can be re-run.
Upgrade messages reference Xpand instead of Clustrix.