Updated on 2025-06-30 GMT+08:00

System Catalogs and System Views

Table 1 Differences in system catalogs or views between GaussDB and MySQL

System Catalog or System View

Column

Differences between GaussDB and MySQL

information_schema.columns

generation_expression

The output of this column varies due to different string concatenation logics of expressions in GaussDB and MySQL.

data_type

The output result of this column in GaussDB, having not been modified due to the data type format_type involved, is different from that in MySQL.

column_type

The output result of this column in GaussDB, having not been modified due to the data type format_type involved, is different from that in MySQL.

information_schema.tables

engine

In GaussDB:

  • ENGINE is aligned with data of information_schema.engines.
  • In some system catalogs, ENGINE is left empty.
  • If the default table is an ASTORE table and STORAGE_TYPE is not specified, ENGINE is empty.

version

GaussDB does not support this column.

row_format

GaussDB does not support this column.

avg_row_length

In GaussDB, the result of dividing the size of the data files by the number of all tuples (including live tuples and dead tuples) is used. If there is no tuple in the table, the value is null.

max_data_length

GaussDB does not support this column.

data_free

In GaussDB, it indicates the result of (number of dead tuples/total number of tuples) multiplied by data file size. If there is no tuple in the table, the value is null.

check_time

GaussDB does not support this column.

create_time

In GaussDB, the behavior of this column is different from that in MySQL. When a view is created in MySQL, this column is set to null. In GaussDB, the actual table creation time is displayed. The value is null if it is a table or view provided by the database.

update_time

The value is null if it is a table or view provided by GaussDB.

table_collation

The behavior of this column in GaussDB is different from that in MySQL. The value is null if the table specifies a view. The value is null if the COLLATE clause is not used to specify the collation of columns when the specified table is created.

information_schema.statistics

collation

GaussDB supports only values A and D and does not support NULL.

packed

GaussDB does not support this column.

sub_part

GaussDB does not support this column.

comment

GaussDB does not support this column.

information_schema.partitions

subpartition_name

In GaussDB, if the partition is not a level-2 partition, the value is null.

subpartition_ordinal_position

In GaussDB, if the partition is not a level-2 partition, the value is null.

partition_method

Partitioning policy in GaussDB. If the partition is not a level-1 partition, the value is null.

  • 'r': range partition.
  • 'i': interval partition.
  • 'l': list partition.
  • 'h': hash partition

subpartition_method

Level-2 partitioning policy in GaussDB. If the partition is not a level-2 partition, the value is null.

  • 'r': range partition.
  • 'i': interval partition.
  • 'l': list partition.
  • 'h': hash partition

partition_description

GaussDB classifies partitions as level-1 and level-2 partitions.

partition_expression

GaussDB does not support this column.

subpartition_expression

GaussDB does not support this column.

data_length

GaussDB does not support this column.

max_data_length

GaussDB does not support this column.

index_length

GaussDB does not support this column.

data_free

GaussDB does not support this column.

create_time

GaussDB does not support this column.

update_time

GaussDB does not support this column.

check_time

GaussDB does not support this column.

checksum

GaussDB does not support this column.

partition_comment

GaussDB does not support this column.

nodegroup

GaussDB does not support this column.

  • The precision range cannot be specified for the command output of the integer type in a view. For example, the bigint(1) type in MySQL corresponds to the bigint type in GaussDB, and the bigint(21) unsigned type in MySQL corresponds to the bigint unsigned type in GaussDB.
  • The int type in MySQL corresponds to the integer type in GaussDB.
  • This version does not support or display Column_priv column in the m_schema.columns_priv view, Table_priv,Column_priv column in the m_schema.tables_priv view, Routine_type,Proc_priv column in the m_schema.procs_priv view, the type,language,sql_data_access,is_deterministic,security_type,sql_mode column in the m_schema.proc view, or the type column in the m_schema.func view.
  • Some columns in information_schema.tables, information_schema.statistics, and information_schema.partitions are obtained based on statistics. Therefore, run ANALYZE to update statistics before viewing them. (If data is updated in the database, you are advised to delay running ANALYZE.)
  • The index columns contained in information_schema.statistics must be complete table columns in the created indexes. If the index columns are expressions, they are not in this view.
  • In information_schema.partitions, level-1 and level-2 partitions are displayed separately.
  • In MySQL, the format of the grantee column in the view is 'user_name'@'host_name'. In GaussDB, it is the name of the user or role to which the permission is granted.
  • The host column in the view returns the host name of the current node in GaussDB.
  • In MySQL, you need the permission before viewing m_schema.tables_priv, information_schema.user_privileges, information_schema.schema_privileges, information_schema.table_privileges, information_schema.column_privileges, m_schema.columns_priv, m_schema.func, and m_schema.procs_priv. In GaussDB, you can view them with the default permission. For example, for table t1, you need the corresponding permission in MySQL so that you can view the corresponding permission information in the permission view. In GaussDB, you can view the permission information related to table t1 in the view.
  • A system view in m_schema is a system catalog in MySQL.
  • The collations of VIEW_DEFINITION in information_schema.views and ROUTINE_DEFINITION in information_schema.routines are not controlled.
  • For the view columns of the character type listed in "Schemas" in M Compatibility Developer Guide, the character set is utf8mb4, and the collation is utf8mb4_bin or utf8mb4_general_ci, and the collation priority is the priority of columns of data types that support collation described in "SQL Reference > Character Set and Collations > Rules for Combining Character Sets and Collations" in M Compatibility Developer Guide. These features are different from those in MySQL.