Skip to main content

SHOW STATS

Synopsis

SHOW STATS FOR table
SHOW STATS FOR ( query )

Description

Returns approximated statistics for the named table or for the results of a query. Returns NULL for any statistics that are not populated or unavailable on the data source.

Statistics are returned as a row for each column, plus a summary row for the table (identifiable by a NULL value for column_name). The following table lists the returned columns and what statistics they represent. Any additional statistics collected on the data source, other than those listed here, are not included.

ColumnDescriptionNotes
column_nameThe name of the columnNULL in the table summary row
data_sizeThe total size in bytes of all of the values in the columnNULL in the table summary row. Available for columns of textual types (CHAR, VARCHAR, etc)
distinct_values_countThe estimated number of distinct values in the column mNULL in the table summary row
nulls_fractionsThe portion of the values in the column that areNULLNULL in the table summary row.
row_countThe estimated number of rows in the tableNULL in column statistic rows
low_valueThe lowest value found in this columnNULL in the table summary row. Available for columns of numeric types (BIGINT, DECIMAL, etc)
high_valueThe highest value found in this columnNULL in the table summary row. Available for columns of numeric types (BIGINT, DECIMAL, etc)