Export PDs for MariaDB Xpand
This page is part of MariaDB's Documentation.
The parent of this page is: ANALYZE TABLE
for MariaDB Xpand
Topics on this page:
Overview
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, sierra_stats
.
Usage of sierra_stats
Sierra_stats
is included by default as part of installation in /opt/clustrix/bin/
directory. The required inputs are --host
, --user
, and -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]
Running sierra_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.
Note
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
CREATE TABLE
statements.A single pds.bin file is created containing PD data for all tables included in the export.
Options
option flag(s) | description |
---|---|
| 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
sierra_
stats cannot be used with users that use sha256 authentication