Project: StarRocks (App Definition and Development / Database)
File: information_schema.md

displayed_sidebar: "English" 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. 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`. ```Plain MySQL > SELECT * FROM informationschema.tables WHERE TABLENAME like 'table1'\G row * TABLE_CATALOG: def TABLESCHEMA: testdb TABLE_NAME: table1 TABLE_TYPE: BASE TABLE ENGINE: StarRocks VERSION: NULL ROW_FORMAT: TABLE_ROWS: 4 AVGROWLENGTH: 1657 DATA_LENGTH: 6630 MAXDATALENGTH: 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 TABLECOLLATION: utf8general_ci CHECKSUM: NULL CREATE_OPTIONS: TABLE_COMMENT: 1 row in set (0.01 sec) ``` The StarRocks Information Schema contains the following metadata views: | View | Description | | -- | | | | `be_bvars` provides statistical information regarding bRPC. | | | `becloudnative_compactions` provides information on compaction transactions running on CNs (or BEs for v3.0) of a shared-data cluster. | | | `be_compactions` provides statistical information on compaction tasks. | | | `character_sets` identifies the character sets available. | | | `collations` contains the collations available. | | | `column_privileges` identifies all privileges granted on columns to a currently enabled role or by a currently enabled role. | | | `columns` contains information about all table columns (or view columns). | | | `engines` provides information about storage engines. | | | `events` provides information about Event Manager events. | | | `global_variables` provides information about global variables. | | | `keycolumnusage` identifies all columns that are restricted by some unique, primary key, or foreign key constraint. | | | `loadtrackinglogs` provides error information (if any) of load jobs. | | | `loads` provides the results of load jobs. Currently, you can only view the results of and jobs from this view. | | | `materialized_views` provides information about all asynchronous materialized views. | | | `partitions` provides information about table partitions. | | | `pipe_files` provides the status of the data files to be loaded via a specified pipe. | | | `pipes` provides information about all pipes stored in the current or specified database. | | | `referential_constraints` contains all referential (foreign key) constraints. | | | `routines` contains all stored routines (stored procedures and stored functions). | | | `schema_privileges` provides information about database privileges. | | | `schemata` provides information about databases. | | | `session_variables` provides information about session variables. | | | `statistics` provides information about table indexes. | | | `table_constraints` describes which tables have constraints. | | | `table_privileges` provides information about table privileges. | | | `tables` provides information about tables. | | | `tables_config` provides information about the configuration of tables. | | | `task_runs` provides information about the execution of asynchronous tasks. | | | `tasks` provides information about asynchronous tasks. | | | `triggers` provides information about triggers. | | | `user_privileges` provides information about user privileges. | | | `views` provides information about all user-defined views. |