System views of OceanBase Database include dictionary views and performance views. This topic provides an overview of dictionary views and system views and describes how to query these views.
Dictionary views
OceanBase Database provides protected data dictionaries and allows you to obtain their information only through dictionary views.
The names of dictionary views provided by OceanBase Database have the following prefixes: information_schema.*, oceanbase.CDB_*, and mysql.*.
information_schema.*: This type of view allows you to access database metadata of MySQL tenants, including names of databases and tables, data types of columns, and access privileges on database objects. This type of view is also called a data dictionary or a system catalog.oceanbase.CDB_*: This type of view allows you to obtain information about some database objects of the SYS tenant and user tenants. This type of view is available only to theSYStenant.mysql.*: This type of view provides information about data dictionary tables that store database object metadata and system tables for other operational purposes. Names of views of this type start with themysqlprefix. For example, a view named in the format ofmysql.help_*provides guidance on servers, a view named in the format ofmysql.time_zone_*records information related to time zones, and themysql.userandmysql.dbviews record information related to user privileges.
Performance views
Performance views are derived from virtual tables that are created based on database memory structures. They provide only data related to internal disk structures and memory structures and are called dynamic performance views because they are mainly related to performance.
Names of performance views start with V$. In most cases, a V$ view corresponds to a GV$ view, which is a global V$ view. If you query a GV$ view, all V$ views that meet the query conditions are retrieved.
Query system views
You can log on to the SYS tenant or a user tenant and execute the SHOW statement to query views of a specific type.
Query
oceanbase.CDB_*views and performance viewsobclient> USE oceanbase; obclient> SHOW TABLES;Query
information_schema.*viewsobclient> USE information_schema; obclient> SHOW TABLES;Query
mysql.*viewsobclient> USE mysql; obclient> SHOW TABLES;