INDEX_STAITISTIC

INDEX_STAITISTIC displays information about indexes in the current database.

Table 1 INDEX_STAITISTIC columns

Name

Type

Description

namespace

name

Specifies a tablespace to which an index belongs.

table

name

Specifies a table to which the index belongs.

non_unique

boolean

Indicates whether the index is unique.

key_name

name

Specifies an index name.

seq_in_index

smallint

Specifies sequence number of the index column in the index.

column_name

name

Specifies an index column name.

collation

text

The value can be A (default value, indicating an ascending order), D (descending order), or NULL (the index does not support sorting).

cardinality

double precision

By calculating pg_statistic.stadistinct and pg_class.reltuples, you can obtain:
stadistinct > 0: stadistinct
stadistinct = 0: NULL
stadistinct < 0: reltuples * stadistinct * -1

.

sub_part

text

Index prefix. If the column is only partially indexed, the value is the number of index characters. If the entire column is indexed, the value is NULL. Currently, the prefix index is not supported. The value is NULL.

packed

text

Specifies how to pack key values. pack_keys is specified when a table is created. Otherwise, null is returned. Not supported currently. The value is NULL.

null

text

Yes if the value is null.

index_type

name

Specifies the index method, such as Btree, and Hash.

comment

text

If indisusable is set to true in the pg_index table, disabled is displayed. If it is set to false, '' is displayed.

index_comment

text

Specifies comments when an index is created.

Feedback
编组 3备份
    openGauss 2024-10-16 00:54:45
    cancel