Updated on 2024-06-03 GMT+08:00

GS_STAT_ALL_PARTITIONS

GS_STAT_ALL_PARTITIONS displays information about each partition in all partitioned tables in the current database. Each partition occupies one row (only its level-2 partitions are displayed for level-2 partitioned tables). The view information is queried by 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 to which the partition belongs.

relname

name

Name of a table where the partition is located.

partition_name

name

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

sub_partition_name

name

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

seq_scan

bigint

Number of sequential scans initiated by a partition.

seq_tup_read

bigint

Number of live rows fetched by sequential scans.

idx_scan

bigint

Number of index scans initiated by a 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 inactive 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 a partition is cleared.

autovacuum_count

bigint

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

analyze_count

bigint

Number of times that a partition is analyzed.

autoanalyze_count

bigint

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