TABLE_STATISTICS and INTERNAL_TABLE_STATISTICS

This view contains information about table statistics. It contains one row per table, per partition. INTERNAL_TABLE_STATICS (an internal use-only table added in v7.8) contains the same columns, and shows information for SingleStore internal metadata tables.

This information can be useful for Detecting and Resolving Data Skew.

Column Name

Description

DATABASE_NAME

The name of the related database.

TABLE_NAME

The name of the related table.

ORDINAL

The partition ID number.

HOST

The hostname or IP address for the related node.

PORT

The port number of the related node.

NODE_TYPE

The type of node: master aggregator (MA), child aggregator (CA), or leaf node (LEAF).

PARTITION_TYPE

The type of partition: master or secondary.

ROWS

The number of rows in a given table and partition.

MEMORY_USE

The memory use, in bytes, of a given table and partition.

STORAGE_TYPE

The storage type of a given table and partition.

ROWS_IN_MEMORY

The number of rows stored in memory for a given table and partition.

Metadata Table Listing

The following metadata tables can be included in the INTERNAL_TABLE_STATISTICS.TABLE_NAME column:

Component

Table Name

Description

Columnstore

md_committed_blobs

Stores file-level information about columnstore data files.

Columnstore

md_gc_blobs

Stores information about columnstore data files that has been logically deleted.

Columnstore

md_columnar_sec_index

Stores information about on-disk index blobs created for columnstore secondary hash indexes.

Columnstore

md_blob_deletion_lsns

Stores more information about columnstore data files that have been logically deleted.

Columnstore

md_columnar_sec_index_is_built

For each columnstore secondary index added through an alter table statement, stores whether the index has been fully built or not.

Columnstore

md_columnar_blobs

Stores information about all column segments in the columnstore tables. The size of this table is proportional to the total row count and the column count across the columnstore tables. See for more info.

Columnstore

md_segments

Stores information about all row segments in the columnstore tables. The size of this table is proportional to the total row count across the columnstore tables. See How the Columnstore Works for more info.

Miscellaneous

md_bottomless_gc_deadlines

Stores information about unlimited storage GC deadlines used to support the unlimited storage retention period.

Miscellaneous

md_partition_instances

Tracks the states of the database partitions.

Miscellaneous

md_logical_partitions

Stores a mapping from logical partitions to the actual partitions.

Miscellaneous

md_queries

Deprecated.

Miscellaneous

md_attributes

Stores database-level attributes for internal use.

Miscellaneous

md_transaction_table

Tracks the states of ongoing distributed transactions.

Miscellaneous

md_task_queue

A queue of pending internal maintence tasks.

Miscellaneous

md_auto_incr_limit

For each auto increment column, stores an upper bound of previously generated auto increment values.

Pipelines

md_pipeline_transform_templates

Deprecated.

Pipelines

md_pipelines

For each auto increment column, stores an upper bound of previously generated auto increment values.

Pipelines

md_extractors_offsets

Contains information about a pipeline's offset ranges for every data source partition. That includes files for FS-like data sources, e.g. S3.

Pipelines

md_extractors

Deprecated.

Pipelines

md_pipelines_aux_files

Tracks on-disk files used for storing pipeline errors. It contains information such as file size, number of errors stored in a file, information about a table, pipeline, batches, etc.

Statistics

md_range_statistics

Deprecated. Replaced by md_advanced_histograms.

Statistics

md_advanced_histograms

Details all of the histograms that have been built in the cluster.

Statistics

md_column_statistics

Contains the cardinality stats for all user tables.

User Objects

md_credentials

Store the connection links created in the database.

User Objects

md_indexes

Stores the index definition for all tables.

User Objects

md_user_aggregate_params

Lists parameter definitions for each function in md_user_aggregates.

User Objects

md_indexColumns

Stores the list of columns contained in each index.

User Objects

md_user_aggregates

Lists all user defined aggregate function definitions. This includes PSQL, external, and Wasm aggregate functions.

User Objects

md_foreign_key_columns

Stores the list of columns contained in each foreign key.

User Objects

md_foreign_keys

Stores the foreign key definition for all tables.

User Objects

md_columns

Stores the column definition for all tables.

User Objects

md_user_functions

Lists all scalar UDF and TVF definitions. This includes PSQL, external, and Wasm functions.

User Objects

md_user_object_names

Lists all routine names from md_user_functions and md_user_aggregates.

User Objects

md_user_function_params

Lists parameter definitions for each function in md_user_functions.

User Objects

md_tables

List all tables in a database.

Last modified: May 28, 2024

Was this article helpful?