Skip to main content

column_statistics

Inspect optimizer statistics collected for table columns.

These are service-maintained tables. Use them for inspection and contact VeloDB Cloud support before changing their schema, properties, or data.

Run the query in the warehouse SQL Editor or a connected SQL client:

SELECT * FROM __internal_schema.column_statistics LIMIT 10;

Database​

__internal_schema

Table information​

Column nameTypeDescription
idvarchar(4096)Unique ID.
catalog_idvarchar(1024)ID of the catalog.
db_idvarchar(1024)ID of the database.
tbl_idvarchar(1024)ID of the table.
idx_idvarchar(1024)ID of the Index.
col_idvarchar(1024)ID of the column, currently storing column names.
part_idvarchar(1024)ID of the partition, always empty.
countbigintNumber of rows.
ndvbigintNumber of distinct values.
null_countbigintNumber of NULLs.
minvarchar(65533)Minimum value.
maxvarchar(65533)Maximum value.
data_size_in_bytesbigintData size in bytes.
update_timedatetimeUpdate time of current statistics.
hot_valuestringEncoded frequent-value statistics, when collected.

Use DESCRIBE __internal_schema.column_statistics; to inspect the schema in your warehouse.

The part_id field in this table is unused for table-level column statistics. For partition-level statistics, inspect partition_statistics.