> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/11/internals/system-catalogs/pg_statistic_ext.md).

# 52.51. pg\_statistic\_ext

版本：11

目錄 pg\_statistic\_ext 包含了延伸的計劃程序統計資訊。此目錄中的每一個資料列相對應於使用 [CREATE STATISTICS](/11/reference/sql-commands/create-statistics.md) 所建立的統計資訊物件。

#### **Table 52.51. `pg_statistic_ext` Columns**

| 欄位                | 型別                | 參考                                                                     | 說明                                                        |
| ----------------- | ----------------- | ---------------------------------------------------------------------- | --------------------------------------------------------- |
| `stxrelid`        | `oid`             | [`pg_class`](/11/internals/system-catalogs/pg_class.md).oid            | 包含此物件包含欄位的所屬資料表                                           |
| `stxname`         | `name`            |                                                                        | 統計物件的名稱                                                   |
| `stxnamespace`    | `oid`             | [`pg_namespace`](/11/internals/system-catalogs/pg_namespace.md).oid    | 包含此統計資訊物件在命名空間裡的 OID                                      |
| `stxowner`        | `oid`             | [`pg_authid`](/11/internals/system-catalogs/pg_authid.md).oid          | 統計物件的所有者                                                  |
| `stxkeys`         | `int2vector`      | [`pg_attribute`](/11/internals/system-catalogs/pg_attribute.md).attnum | 一組陣列表示的屬性數字，指示此統計物件覆蓋哪些資料表欄位；例如，值為 1 3 意味著覆蓋了第一個和第三個資料表欄位 |
| `stxkind`         | `char[]`          |                                                                        | 包含已啟用統計類型的代碼的陣列；有效值為：d 表示 n-distinct 統計資訊，f 表示功能相依統計資訊    |
| `stxndistinct`    | `pg_ndistinct`    |                                                                        | N-distinct 計數，序列化為 pg\_ndistinct 型別                       |
| `stxdependencies` | `pg_dependencies` |                                                                        | 功能相依統計資訊，序列化為 pg\_dependencies 型別                         |

stxkind 欄位會在建立統計物件時填入，指示需要哪種統計類型。在它之後的欄位最初為 NULL，僅在 ANALYZE 計算出相對應的統計量時才填入內容。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/11/internals/system-catalogs/pg_statistic_ext.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
