Skip to main content
Version: 3.5 Stable

Information Schema

The StarRocks Information Schema is a database within each StarRocks instance. Information Schema contains several read-only, system-defined views that store extensive metadata information of all objects that the StarRocks instance maintains. The StarRocks Information Schema is based on the SQL-92 ANSI Information Schema, but with the addition of views and functions that are specific to StarRocks.

From v3.2.0, The StarRocks Information Schema supports manage metadata for external catalogs.

View metadata via Information Schema​

You can view the metadata information within a StarRocks instance by querying the content of views in Information Schema.

The following example checks metadata information about a table named table1 in StarRocks by querying the view tables.

MySQL > SELECT * FROM information_schema.tables WHERE TABLE_NAME like 'table1'\G
*************************** 1. row ***************************
TABLE_CATALOG: def
TABLE_SCHEMA: test_db
TABLE_NAME: table1
TABLE_TYPE: BASE TABLE
ENGINE: StarRocks
VERSION: NULL
ROW_FORMAT:
TABLE_ROWS: 4
AVG_ROW_LENGTH: 1657
DATA_LENGTH: 6630
MAX_DATA_LENGTH: NULL
INDEX_LENGTH: NULL
DATA_FREE: NULL
AUTO_INCREMENT: NULL
CREATE_TIME: 2023-06-13 11:37:00
UPDATE_TIME: 2023-06-13 11:38:06
CHECK_TIME: NULL
TABLE_COLLATION: utf8_general_ci
CHECKSUM: NULL
CREATE_OPTIONS:
TABLE_COMMENT:
1 row in set (0.01 sec)

Views in Information Schema​

The StarRocks Information Schema contains the following metadata views:

ViewDescription
be_bvarsbRPC statistics, such as RPC latency and QPS, for some StarRocks components.
be_cloud_native_compactionsCompaction transactions running on the CNs of a shared-data cluster.
be_compactionsStatistics on compaction tasks.
character_setsThe character sets available.
collationsThe collations available.
columnsAll table columns and view columns.
global_variablesGlobal variables.
load_tracking_logsError logs of load jobs.
loadsResults of load jobs.
materialized_viewsAll materialized views.
partitions_metaPartitions of tables.
pipe_filesStatus of the data files to be loaded via a specified pipe.
pipesAll pipes stored in the current or specified database.
schemataDatabases.
session_variablesSession variables.
tablesTables.
tables_configConfiguration of tables.
task_runsExecution of asynchronous tasks.
tasksAsynchronous tasks.
viewsAll user-defined views.

Views defined for compatibility​

The following views are defined but not implemented in StarRocks. Each page carries a note to that effect.

ViewDescription
column_privilegesPrivileges granted on columns.
enginesStorage engines.
eventsEvent Manager events.
key_column_usageColumns restricted by a unique, primary key, or foreign key constraint.
partitionsTable partitions. Use partitions_meta instead.
referential_constraintsReferential (foreign key) constraints.
routinesStored routines (stored procedures and stored functions).
schema_privilegesDatabase privileges.
statisticsTable indexes.
table_constraintsWhich tables have constraints.
table_privilegesTable privileges.
triggersTriggers.
user_privilegesUser privileges.