> 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/internals/catalogs/catalog-pg-statistic-ext-data.md).

# 52.53. pg\_statistic\_ext\_data \#

The catalog `pg_statistic_ext_data` holds data for extended planner statistics defined in [`pg_statistic_ext`](/internals/catalogs/catalog-pg-statistic-ext.md). Each row in this catalog corresponds to a *statistics object* created with [`CREATE STATISTICS`](/reference/sql-commands/sql-createstatistics.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`](/internals/catalogs/catalog-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`](/internals/views/view-pg-stats-ext.md) is a publicly readable view on `pg_statistic_ext_data` (after joining with [`pg_statistic_ext`](/internals/catalogs/catalog-pg-statistic-ext.md)) that only exposes information about tables the current user owns.

**Table 52.53. `pg_statistic_ext_data` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>stxoid</code> <code>oid</code> (references <a href="/pages/PBajbiDNekbIsqryC08c"><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>                                                                        |

<br>

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/catalog-pg-statistic-ext-data.html)（英文原文，待翻譯）


---

# 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 dynamically by asking a question.

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

```
GET https://docs.postgresql.tw/internals/catalogs/catalog-pg-statistic-ext-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
