PG_STATISTIC
PG_STATISTIC records statistics about tables and index columns in a database. By default, only the system administrator can access the system catalog. Common users can access the system catalog only after being authorized.
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.
|
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.
|
staextinfo |
text |
Information about extension statistics. This is reserved. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot