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:
ποΈ be_bvars
be_bvars provides statistical information regarding bRPC. You can view RPC latency, QPS, and other statistics for some components of StarRocks.
ποΈ be_cloud_native_compactions
becloudnativecompactions provides information on compaction transactions running on CNs (or BEs for v3.0) of a shared-data cluster. A compaction transaction is divided into multiple tasks on the partition level, and each row in becloudnativecompactions corresponds to a task in the compaction transaction.
ποΈ be_compactions
be_compactions provides statistical information on compaction tasks.
ποΈ character_sets
character_sets identifies the character sets available.
ποΈ collations
collations contains the available collations.
ποΈ column_privileges
This view does not apply to the available features in StarRocks.
ποΈ columns
columns contains information about all table columns (or view columns).
ποΈ engines
This view does not apply to the available features in StarRocks.
ποΈ events
This view does not apply to the available features in StarRocks.
ποΈ global_variables
global_variables provides information about global variables.
ποΈ key_column_usage
This view does not apply to the available features in StarRocks.
ποΈ load_tracking_logs
loadtrackinglogs provides error logs of load jobs. This view is supported from StarRocks v3.0 onwards.
ποΈ loads
loads provides the results of load jobs. This view is supported from StarRocks v3.1 onwards. Currently, you can only view the results of Broker Load and INSERT jobs from this view.
ποΈ materialized_views
materialized_views provides information about all materialized views.
ποΈ partitions
This view does not apply to the available features in StarRocks.
ποΈ pipe_files
pipe_files provides the status of the data files to be loaded via a specified pipe. This view is supported from StarRocks v3.2 onwards.
ποΈ pipes
pipes provides information about all pipes stored in the current or specified database. This view is supported from StarRocks v3.2 onwards.
ποΈ referential_constraints
This view does not apply to the available features in StarRocks.
ποΈ routines
This view does not apply to the available features in StarRocks.
ποΈ schema_privileges
This view does not apply to the available features in StarRocks.
ποΈ schemata
schemata provides information about databases.
ποΈ session_variables
session_variables provides information about session variables.
ποΈ statistics
This view does not apply to the available features in StarRocks.
ποΈ table_constraints
This view does not apply to the available features in StarRocks.
ποΈ table_privileges
This view does not apply to the available features in StarRocks.
ποΈ tables
tables provides information about tables.
ποΈ tables_config
tables_config provides information about the configuration of tables.
ποΈ task_runs
task_runs provides information about the execution of asynchronous tasks.
ποΈ tasks
tasks provides information about asynchronous tasks.
ποΈ triggers
This view does not apply to the available features in StarRocks.
ποΈ user_privileges
This view does not apply to the available features in StarRocks.
ποΈ views
views provides information about all user-defined views.