# 52.51. pg\_statistic\_ext

目錄 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
