> 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/15/internals/system-catalogs/pg_statistic_ext_data.md).

# 53.53. pg\_statistic\_ext\_data

## 53.53. pg\_statistic\_ext\_data

The catalog `pg_statistic_ext_data` holds data for extended planner statistics defined in [`pg_statistic_ext`](/15/internals/system-catalogs/pg_statistic_ext.md). Each row in this catalog corresponds to a *statistics object* created with [`CREATE STATISTICS`](/15/reference/sql-commands/create-statistics.md).

Normally there is one entry, with `stxdinherit` = `false`, for each statistics object that has been analyzed. If the table has inheritance children or partitions, a second entry with `stxdinherit` = `true` is also created. This row represents the statistics object over the inheritance tree, i.e., statistics for the data you'd see with `SELECT * FROM`` `*`table`*`*`, whereas the `stxdinherit` = `false` row represents the results of `SELECT * FROM ONLY`` `*`table`*.

Like [`pg_statistic`](/15/internals/system-catalogs/pg_statistic.md), `pg_statistic_ext_data` should not be readable by the public, since the contents might be considered sensitive. (Example: most common combinations of values in columns might be quite interesting.) [`pg_stats_ext`](/15/internals/54.-system-views/pg_stats_ext.md) is a publicly readable view on `pg_statistic_ext_data` (after joining with [`pg_statistic_ext`](/15/internals/system-catalogs/pg_statistic_ext.md)) that only exposes information about tables the current user owns.

**Table 53.53. `pg_statistic_ext_data` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>stxoid</code> <code>oid</code> (references <a href="/15/internals/system-catalogs/pg_statistic_ext.md"><code>pg\_statistic\_ext</code></a>.<code>oid</code>)</p><p>Extended statistics object containing the definition for this data</p> |
| <p><code>stxdinherit</code> <code>bool</code></p><p>If true, the stats include values from child tables, not just the values in the specified relation</p>                                                                                         |
| <p><code>stxdndistinct</code> <code>pg\_ndistinct</code></p><p>N-distinct counts, serialized as <code>pg\_ndistinct</code> type</p>                                                                                                                |
| <p><code>stxddependencies</code> <code>pg\_dependencies</code></p><p>Functional dependency statistics, serialized as <code>pg\_dependencies</code> type</p>                                                                                        |
| <p><code>stxdmcv</code> <code>pg\_mcv\_list</code></p><p>MCV (most-common values) list statistics, serialized as <code>pg\_mcv\_list</code> type</p>                                                                                               |
| <p><code>stxdexpr</code> <code>pg\_statistic\[]</code></p><p>Per-expression statistics, serialized as an array of <code>pg\_statistic</code> type</p>                                                                                              |

***

原文：[PostgreSQL 15.19 Documentation](/15/internals/system-catalogs/pg_statistic_ext_data.md)（英文原文，待翻譯）


---

# 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/15/internals/system-catalogs/pg_statistic_ext_data.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.
