Configure the Predictive Governor with MariaDB Xpand

Overview

The predictive governor prevents execution of queries that are estimated to process an excessive number of rows as a result of a join. This may be the result of a join query that is poorly indexed, or that is written such that it does not use available indexes.

Compatibility

  • MariaDB Xpand 6.1

Configure the Predictive Governor Threshold

To set a threshold for the predictive governor, use the sierra_predictive_governor_threshold system variable:

SET GLOBAL sierra_predictive_governor_threshold=<number_of_rows>;

If a query would exceed the threshold, the following error is thrown:

ERROR 1 (HY000): [70660] Could not generate plan in sierra:
sierra_predictive_governor: Excess execution predicted

Disable the Predictive Governor

To disable the predictive governor, use the sierra_predictive_governor system variable:

SET GLOBAL sierra_predictive_governor=OFF;

System Variables

The following system variables configure the predictive governor functionality:

System Variable

Description

sierra_predictive_governor

Enable the predictive governor (default: true).

sierra_predictive_governor_threshold

Number of rows processed by a query before the predictive governor prevents execution (default: 100000000000).