What's New in MariaDB Xpand 6?

Columnar Indexes

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

  • The cost_read_column system variable is used for costing columnar reads. The default value of cost_read_column in Xpand 5.3 was 0.01. For deployments upgrading to Xpand 6 from previous versions, the value of cost_read_column should be set to 0.9.

  • For additional information, see "MariaDB Xpand Columnar Index Architecture".

Parallel Replication

  • 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 SLAVE and 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];

Strict Mode

  • MariaDB Xpand 6 includes some improvements related to strict mode.

  • When sql_mode=STRICT_TRANS_TABLES is 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 innodb_strict_mode system variable.

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)

  • The sql_log_skip_binlogs system 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 binlogA and binlogB, set the system variable by executing SET:

SET sql_log_skip_binlogs='binlogA,binlogB';
  • To re-enable writes to all binlogs for the current session, set the system variable back to DEFAULT:

SET sql_log_skip_binlogs=DEFAULT;

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.

Xpand Branding

  • 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:

    • Renamed /etc/clustrix to /etc/xpand

    • Renamed /etc/clustrix/clxnode.conf to /etc/xpand/xpdnode.conf

    • Renamed uninstall_clustrix to uninstall_xpand

  • Xpand's Alerter looks for noalerts in /etc/xpand.

  • Xpand's Upgrader uses /etc/xpand instead of /etc/clustrix.

    • If /etc/xpand doesn't exist, the upgrader will print instructions on how to create a symbolic link to from /etc/clustrix to /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.

Installation Instructions

Upgrade Instructions