system Tables in Xpand

Overview

MariaDB Xpand includes system tables in the system database.

Table

Description

alter_progress

Rough estimate of progress for an ALTER operation.

cluster_session_stats

Per-session statistics on transaction and statement types.

databases

Databases containing Xpand tables.

gtm_coord

Stores information on open transactions.

internode_latency_histogram

Histograms of node to node network latencies.

mysql_master_status

Information on each Replica Server that is currently connected to the Xpand service.

mysql_slave_stats

Information related to replication when Xpand is configured for in-bound replication

partition_sizes

Provides a list of partitions and their sizes.

rebalancer_activity_log

Details on operations performed by the rebalancer process and the reason why the operation was triggered.

rebalancer_summary

Summary of current rebalancer operations.

relations

Details on Xpand tables in the deployment.

representations

Details on representations produced by each index on each Xpand table. These are the basis for data distribution through the Xpand deployment.

roles

Stores the names of all roles on the Xpand cluster.

roles_mapping

Stores the mapping between roles and and user specifications, including whether the user was granted WITH ADMIN for the role.

session_roles

Stores the list of roles available to a session.

sessions

Information on currently connection and recently disconnected sessions.

stats

Internal statistics on database and deployment performance.

system_users

Information on database users, host, and password combinations.

table_replicas

Contains one row for each replica in the system and records each replica's size and node.

table_sizes

Total size of each Xpand table.

table_slices

Information on table slices, produced by dividing representations of each Xpand table.

users

Stores database user, host, and password combinations.

user_role_links

Stores a mapping between roles and user specifications, including whether the role is a default role for the user.

vdev_io_latency_histogram

Stores a histogram that tracks disk latency.

version_history

History of installation and upgrade versions.

ALTER_PROGRESS

The alter_progress table provides a rough estimate of the progress for an ALTER.

Name

Description

db

The ID for the session.

src_relation_name

The name of the source relation.

start

Timestamp for when the alter started.

rows_read

The number of rows read by the ALTER.

src_relation_est_rows

The estimated number of rows in the source relation

completion_est

A rough estimate of when the ALTER might finish.

CLUSTER_SESSION_STATS

The cluster_session_stats table contains per-session statistics about transactions and statement types.

DATABASES

The databases table contains one row for each database in the system. Its columns are as follows:

Name

Description

db

Contains an ID for each database. It corresponds to the db column in the relations table.

user

Contains the ID of the user who created the database. It corresponds to the user column of the users table.

name

Name of the database.

hidden

Indicates whether the table is hidden from users when performing queries:

  • 1 means the table is hidden;

  • 0 means the table is not hidden.

cscl

An internal value that encodes the character set and collation sequence utilized by a given database.

To translate this encoded value to English, a special function is available as follows:

SELECT OIDTYPE_CSCL_PROP(cscl, 'charset')
   FROM system.databases
   WHERE name = 'sample';

SELECT OIDTYPE_CSCL_PROP(cscl, 'collation')
   FROM system.databases
   WHERE name = 'sample';

GTM_COORD

The gtm_coord table contains a row for each open transaction.

INTERNODE_LATENCY_HISTOGRAM

The internode_latency_histogram table stores histograms of node to node network latencies.

MYSQL_MASTER_STATUS

The mysql_master_status table stores information about each replication slave that is currently connected to the cluster.

MYSQL_SLAVE_STATS

The mysql_slave_stats table contains information related to replication when Xpand is configured for in-bound replication

PARTITION_SIZES

The partition_sizes table provides a list of partitions and their sizes.

Name

Description

database

relation

representation

partition

bytes

REBALANCER_ACTIVITY_LOG

The rebalancer_activity_log table contains a detailed log of Rebalancer actions and the reasons for those actions. For additional information, see "Manage the Rebalancer for MariaDB Xpand".

REBALANCER_SUMMARY

The cluster performs ongoing optimization tasks in background mode. In rare cases, this background activity might affect query performance. In such cases, the Rebalancer, which moves data between disks and nodes to ensure even distribution, is a likely source. Rebalancing typically runs after an import, and occasionally runs as disk utilization increases. Because Rebalancer sessions can be brief, the rebalancer_activity_log table is a better source for detailed information.

Values returned in the action column are as follows:

Action

Description

split

A slice has grown too large and is being split into two smaller slices.

move

A slice is being moved to another disk or node to optimize the load.

copy

A slice is being duplicated, usually during the reprotection stage after a hardware failure.

For more information about Xpand Rebalancer tasks, see "Rebalancer Tasks for MariaDB Xpand".

The rebalancer_activity_log table contains a detailed log of Rebalancer actions and the reasons for those actions. For additional information, see "Manage the Rebalancer for MariaDB Xpand".

RELATIONS

The relations table contains one row for each table in the system.

REPRESENTATIONS

The representations table contains one row per representation in the system. Each relation and each index on that relation constitutes a representation. The base column indicates when the representation is the Base Representation.

ROLES

The roles table contains the names of all roles on the Xpand cluster.

ROLES_MAPPING

The roles_mapping table contains the mapping between roles and and user specifications, including whether the user was granted WITH ADMIN for the role.

SESSION_ROLES

The session_roles table contains the list of roles available to a session.

SESSIONS

The sessions table contains information about all currently connected and recently disconnected client sessions.

STATS

The stats table contains internally-collected statistics about database and cluster performance. Most of these statistics are for internal use, but some are of general interest.

SYSTEM_USERS

The system_users table contains information on database users, host, and password combinations.

TABLE_REPLICAS

The table_replicas table contains one row for each replica in the system and records each replica's size and node. This table can be used to determine the total calculated size of an index and to find poorly-distributed indexes. each slice is replicated two or more times and each replica resides on a different node. Each replica of a slice contains the same data.

TABLE_SIZES

The table_sizes table records the total size of each table in bytes, including its base representation and all of its indexes.

TABLE_SLICES

Representations are split into slices and distributed throughout your cluster. The table_slices table enumerates those slices and indexes and contains one row for each slice in each table.

Each slice contains a unique set of rows from the table. The complete table is represented by assembling all the rows from the table slices. The rows are allocated to slices using a hash that is based on the row's index or indices. The number of slices per table depends on many factors including the size of the cluster. To configure this setting, issue the ALTER TABLE SET SLICES = <N> command. Changing the slice count can improve performance. For details, contact MariaDB support.

Note

To display the names of the database, table, and indexes for each slice, join on the slice column.

USERS

The users table contains database user, host, and password combinations. Join to this table to display user names instead of user ids. For additional information, see "Database User Accounts for MariaDB Xpand".

VDEV_IO_LATENCY_HISTOGRAM

The vdev_io_latency_histogram table stores a histogram that tracks disk latency.

Name

Description

nodeid

vdevid

bucket_ms_max

read_count

write_count

VERSION_HISTORY

The version_history table provides a history of installation and upgrade versions.