Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

PG_STATISTIC

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

PG_STATISTIC stores statistics about tables and index columns in a database. By default, only a system administrator can access the system catalog. Common users can access this system catalog only after being authorized.

Table 1 PG_STATISTIC columns

Name

Type

Description

starelid

oid

Table or index that the described column belongs to.

starelkind

"char"

Type of an object.

staattnum

smallint

Number of the described column in the table, starting from 1.

stainherit

boolean

Specifies whether to collect statistics for objects that have inheritance relationship.

stanullfrac

real

Percentage of column entries that are null.

stawidth

integer

Average stored width, in bytes, of non-null entries.

stadistinct

real

Number of distinct, non-null data values in the column for all DNs.

  • A value greater than 0 is the actual number of distinct values.
  • A value less than 0 is the ratio of the distinct value to the total number of rows. For example, if stadistinct is -0.5, the actual distinct value is the total number of rows multiplied by 0.5.
  • The value 0 indicates that the number of distinct values is unknown.

stakindN

smallint

Code number stating that the type of statistics is stored in slot N of the pg_statistic row.

The value of N ranges from 1 to 5.

staopN

oid

Operator used to generate the statistics stored in slot N. For example, a histogram slot shows the < operator that defines the sort order of the data.

The value of N ranges from 1 to 5.

stanumbersN

real[]

Numerical statistics of the appropriate type for slot N. The value is NULL if the slot does not involve numerical values.

The value of N ranges from 1 to 5.

stavaluesN

anyarray

Column data values of the appropriate type for slot N. The value is NULL if the slot type does not store any data values. Each array's element values are actually of the specific column's data type so there is no way to define these columns' type more specifically than anyarray.

The value of N ranges from 1 to 5.

stadndistinct

real

Number of unique non-null data values in the DN1 column.

  • A value greater than 0 is the actual number of distinct values.
  • A value less than 0 is the ratio of the distinct value to the total number of rows. For example, if stadndistinct is -0.5, the actual distinct value is the total number of rows multiplied by 0.5.
  • The value 0 indicates that the number of distinct values is unknown.

staextinfo

text

Information about extension statistics. This is reserved.

stastate

"char"

Specifies whether the statistics are locked. If the statistics are locked, they cannot be updated. Currently, this parameter is meaningless in distributed mode.

  • l: locked
  • u: unlocked
NOTICE:

PG_STATISTIC stores sensitive information about statistical objects, such as MCVs. The system administrator and authorized users can access the PG_STATISTIC system catalog to query the sensitive information about the statistical objects.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback