The metadatabase of PolarDB-X is the INFORMATION_SCHEMA database that is compatible with the metadatabase of MySQL. To query the metadatabase, you can execute SQL statements over the JDBC connection.
INFORMATION_SCHEMA table | Compatible with the relevant table of PolarDB-X |
---|---|
SCHEMATA | Yes |
TABLES | Yes |
COLUMNS | Yes |
STATISTICS | Yes |
COLUMN_STATISTICS | Histogram statistics are in PolarDB-X format. |
ENGINES | Yes |
KEYWORDS | Yes |
COLLATIONS | Yes |
TABLE_CONSTRAINTS | Yes |
PROCESSLIST | Yes |
SESSION_VARIABLES | Yes |
GLOBAL_VARIABLES | Yes |
INNODB_LOCKS | Yes |
INNODB_TRX | Yes |
INNODB_BUFFER_PAGE | Yes |
INNODB_BUFFER_POOL_STATS | Yes |
INNODB_BUFFER_PAGE_LRU | Yes |
INNODB_LOCK_WAITS | Yes |
USER_PRIVILEGES | Yes |
PARTITIONS | Only PolarDB-X partitioned tables are supported. |
WORKLOAD | The hybrid transaction/analytical processing (HTAP) workload in PolarDB-X. |
GLOBAL_INDEXES | Global secondary indexes in PolarDB-X. |
METADATA_LOCK | The information about metadata locks (MDLs) in the PolarDB-X instance. |
TABLE_GROUP | The information about table groups in the PolarDB-X instance. |
TABLE_DETAIL | The information about each stored partition in partitioned tables in the PolarDB-X instance. |
LOCALITY_INFO | The locality information in the PolarDB-X instance. |
PHYSICAL_PROCESSLIST | The information about SQL statements from compute nodes to data nodes in the PolarDB-X instance. |
PLAN_CACHE | The information about the plan cache in the PolarDB-X instance. |
STATISTIC_TASK | The information about the statistics task in the PolarDB-X instance. |
CCL_RULE | The information about concurrency control (CCL) rules in the PolarDB-X instance. |
CCL_TRIGGER | The information about triggered CCL rules in the PolarDB-X instance. |
SEQUENCES | The information about Sequence in the PolarDB-X instance. |
SCHEMA_PRIVILEGES | No |
TABLE_PRIVILEGES | No |
INNODB_TEMP_TABLE_INFO | No |
INNODB_SYS_INDEXES | No |
INNODB_SYS_FIELDS | No |
INNODB_CMP_PER_INDEX_RESET | No |
INNODB_FT_DEFAULT_STOPWORD | No |
INNODB_FT_INDEX_TABLE | No |
INNODB_FT_INDEX_CACHE | No |
INNODB_SYS_TABLESPACES | No |
INNODB_METRICS | No |
INNODB_SYS_FOREIGN_COLS | No |
INNODB_CMPMEM | No |
INNODB_SYS_COLUMNS | No |
INNODB_SYS_FOREIGN | No |
INNODB_SYS_TABLESTATS | No |
INNODB_FT_CONFIG | No |
INNODB_SYS_VIRTUAL | No |
INNODB_CMP | No |
INNODB_FT_BEING_DELETED | No |
INNODB_CMP_PER_INDEX | No |
INNODB_CMPMEM_RESET | No |
INNODB_CMP_RESET | No |
INNODB_FT_DELETED | No |
INNODB_SYS_TABLES | No |
INNODB_SYS_DATAFILES | No |
PROFILING | No |
REFERENTIAL_CONSTRAINTS | No |
SESSION_STATUS | No |
TABLESPACES | No |
EVENTS | No |
TRIGGERS | No |
ROUTINES | No |
COLUMN_PRIVILEGES | No |
FILES | No |
KEY_COLUMN_USAGE | No |
OPTIMIZER_TRACE | No |
PARAMETERS | No |
CHARACTER_SETS | No |
COLLATION_CHARACTER_SET_APPLICABILITY | No |
PLUGINS | No |
SCHEMATA
The SCHEMATA table provides the information about databases. The table contains the following columns:
CATALOG_NAME: the name of the catalog to which the database belongs. Set the value to def.
SCHEMA_NAME: the name of the database.
DEFAULT_CHARACTER_SET_NAME: the default name of the character set in the database.
DEFAULT_COLLATION_NAME: the default collation name of the database.
SQL_PATH: Set the value to NULL.
TABLES
The TABLES table provides the information about database tables. The table contains the following columns:
TABLE_CATALOG: the name of the catalog to which the table belongs. Set the value to def.
TABLE_SCHEMA: the name of the database to which the table belongs.
TABLE_NAME: the name of the table.
TABLE_TYPEBASE: the table type. For standard tables, the value is TABLE. For views, the value is VIEW. For INFORMATION_SCHEMA tables, the value is SYSTEM VIEW.
ENGINE: the storage engine of the database.
VERSION: the version of the database.
ROW_FORMAT: the row format.
TABLE_ROWS: the estimated number of rows in the table.
AVG_ROW_LENGTH: the average row length.
DATA_LENGTH: the estimated space of the base table.
MAX_DATA_LENGTH: the maximum space of the table. Default value: NULL.
INDEX_LENGTH: the estimated space of the index table.
DATA_FREE: the idle space of the table.
AUTO_INCREMENT: the next AUTO_INCREMENT value.
CREATE_TIME: the time when the table was created.
UPDATE_TIME: the time when the table was updated.
CHECK_TIME: the time when the table was checked. Set the value to NULL.
TABLE_COLLATION: the default collation of the table.
CHECKSUM: the CHECKSUM value of the table.
CREATE_OPTIONS: the options in CREATE TABLE statements.
TABLE_COMMENT: the comment used when the table is created.
COLUMNS
The COLUMNS table provides the information about database columns. The table contains the following columns:
TABLE_CATALOG: the catalog name of the table to which the column belongs. Set the value to def.
TABLE_SCHEMA: the database name of the table to which the column belongs.
TABLE_NAME: the name of the table to which the column belongs.
COLUMN_NAME: the column name.
ORDINAL_POSITION: the position of the column in the table.
COLUMN_DEFAULT: the default value of the column.
IS_NULLABLE: specifies whether the column can be set to Null.
DATA_TYPE: the data type of the column. The value does not contain the precision of the column.
CHARACTER_MAXIMUM_LENGTH: the maximum length of the column. Unit: characters.
CHARACTER_OCTET_LENGTH: the maximum length of the column. Unit: bytes.
NUMERIC_PRECISION: the numeric precision of the column.
NUMERIC_SCALE: the numeric scale of the column.
DATETIME_PRECISION: the datetime precision of the column.
CHARACTER_SET_NAME: the name of the character set for the column.
COLLATION_NAME: the collation name of the column.
COLUMN_TYPE: the column type. The value contains the precision of the column.
COLUMN_KEY: the index information about the column.
EXTRA: the additional information about the column.
PRIVILEGES: the permissions that are granted to the column.
COLUMN_COMMENT: the comment in the column definition.
GENERATION_EXPRESSION: the automatically generated column.
STATISTICS
The STATISTICS table provides the information about database indexes. The table contains the following columns:
TABLE_CATALOG: the catalog name of the table to which the index belongs. Set the value to def.
TABLE_SCHEMA: the schema name of the table to which the index belongs.
TABLE_NAME: the name of the table to which the index belongs.
NON_UNIQUE: specifies whether the index is unique.
INDEX_SCHEMA: the schema name of the table to which the index belongs.
INDEX_NAME: the name of the index.
SEQ_IN_INDEX: the sequence number of the index to which the column belongs.
COLUMN_NAME: the column name.
COLLATION: the information about the column collation.
CARDINALITY: the value of the cardinality column.
SUB_PART: the prefix of the index.
PACKED: the information about the compressed index.
NULLABLE: specifies whether the column can contain NULL values.
INDEX_TYPE: the type of the index.
COMMENT: the comment of the index. The comment is not in the form of columns.
INDEX_COMMENT: the comment of the index.
For more information about Information_schema tables, visit the MySQL official website.