Export PDs for MariaDB Xpand
Xpand provides the ability to export Probability Distributions (PDs), which can be useful along with schema (DDL) to investigate the performance of a query. Typically, this procedure is performed upon request by MariaDB Support. The following section outlines how to export PDs using a python script,
Usage of sierra_
Sierra_stats is included by default as part of installation in
/opt/clustrix/bin/ directory. The required inputs are
-p (prompt for password), and
--file, which is the name of the
.tar.gz file to produce.
./sierra_stats -u username -H hostname_or_ip -p --db database -f filename [space_separated_list_of_tables]
SYSTEM tables. If no list of tables is specified,
sierra_stats can export all the tables in one database. To export tables from multiple database, include a fully qualified list of tables.
sierra_stats requires Python version 2.7
The output of
sierra_stats is a
.tar.gz file consisting:
a SQL text file for each database with
A single pds.bin file is created containing PD data for all tables included in the export.
Show help message and exit
Xpand node hostname to connect to. In system.users if host for the user is 127.0.0.1, this must be used for hostname.
Username to connect as
Database port (default:3306)
Provide password on CLI (not recommended)
Prompt for password (recommended)
Database name to dump tables from
filename for export output
Caveats for sierra_
stats cannot be used with users that use sha256 authentication