Updated on 2024-05-07 GMT+08:00

GS_STAT_ALL_PARTITIONS

GS_STAT_ALL_PARTITIONS contains information about each partition in all partitioned tables in the current database. Each partition occupies one row, showing the access statistics of the partition. The information can be queried by using the gs_stat_get_all_partitions_stats() function.

Table 1 GS_STAT_ALL_PARTITIONS columns

Name

Type

Description

partition_oid

oid

Partition OID.

schemaname

name

Schema name of a table where the partition is located.

relname

name

Name of the table where the partition is located.

partition_name

name

Name of the level-1 partition to which the partition belongs.

sub_partition_name

name

Name of the level-2 partition to which the partition belongs. The distributed system does not support level-2 partitions. Set this parameter to NULL.

seq_scan

bigint

Number of sequential scans initiated by the partition.

seq_tup_read

bigint

Number of live rows fetched by sequential scans.

idx_scan

bigint

Number of index scans initiated by the partition.

idx_tup_fetch

bigint

Number of live rows fetched by index scans.

n_tup_ins

bigint

Number of rows inserted.

n_tup_upd

bigint

Number of rows updated.

n_tup_del

bigint

Number of rows deleted.

n_tup_hot_upd

bigint

Number of rows HOT updated (with no separate index update required).

n_live_tup

bigint

Estimated number of live rows.

n_dead_tup

bigint

Estimated number of dead rows

last_vacuum

timestamp with time zone

Time when the partition was last cleared.

last_autovacuum

timestamp with time zone

Time when the partition was last cleared by the autovacuum daemon thread.

last_analyze

timestamp with time zone

Time when the partition was last analyzed.

last_autoanalyze

timestamp with time zone

Time when the partition was last analyzed by the autovacuum daemon thread.

vacuum_count

bigint

Number of times that the partition is cleared.

autovacuum_count

bigint

Number of times that the partition is cleared by the autovacuum daemon thread.

analyze_count

bigint

Number of times that the partition is analyzed.

autoanalyze_count

bigint

Number of times that the partition is analyzed by the autovacuum daemon thread.