バージョンごとのドキュメント一覧

53.52. pg_statistic_ext #

The catalog <structname>pg_statistic_ext</structname> holds definitions of extended planner statistics. Each row in this catalog corresponds to a <firstterm>statistics object</firstterm> created with <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link>. カタログpg_statistic_extはプランナの拡張統計情報の定義を保持します。 このカタログの各行はCREATE STATISTICSで作成された統計オブジェクトに対応します。

表53.52 pg_statistic_extの列

<title><structname>pg_statistic_ext</structname> Columns</title>

Column Type 列 型

Description 説明

oid oid

Row identifier 行識別子

stxrelid oid (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>) (参照先 pg_class.oid

Table containing the columns described by this object このオブジェクトが記述する列を含むテーブル

stxname name

Name of the statistics object 統計オブジェクトの名前

stxnamespace oid (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>oid</structfield>) (参照先 pg_namespace.oid

The OID of the namespace that contains this statistics object この統計オブジェクトを含む名前空間のOID

stxowner oid (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>) (参照先 pg_authid.oid

Owner of the statistics object 統計オブジェクトの所有者

stxstattarget int4

<structfield>stxstattarget</structfield> controls the level of detail of statistics accumulated for this statistics object by <link linkend="sql-analyze"><command>ANALYZE</command></link>. A zero value indicates that no statistics should be collected. A negative value says to use the maximum of the statistics targets of the referenced columns, if set, or the system default statistics target. Positive values of <structfield>stxstattarget</structfield> determine the target number of <quote>most common values</quote> to collect. stxstattargetANALYZEによるこの列に対する蓄積された統計情報をどの程度詳しく管理するかを規定します。 値がゼロの場合は統計情報を収集しません。 負の値の場合は、参照する列の統計情報の収集目標の最大値があればそれを使い、なければシステムのデフォルトの統計目標を使用すべきであるということです。 正の値のstxstattargetは、収集する最も一般的な値の目標となる数を決定します。

stxkeys int2vector (references <link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.<structfield>attnum</structfield>) (参照先 pg_attribute.attnum

An array of attribute numbers, indicating which table columns are covered by this statistics object; for example a value of <literal>1 3</literal> would mean that the first and the third table columns are covered 属性番号の配列で、どのテーブル列が統計オブジェクトに含まれるかを示します。 例えば、値が1 3なら、テーブルの1番目と3番目の列が含まれるということになります。

stxkind char[]

An array containing codes for the enabled statistics kinds; valid values are: <literal>d</literal> for n-distinct statistics, <literal>f</literal> for functional dependency statistics, <literal>m</literal> for most common values (MCV) list statistics, and <literal>e</literal> for expression statistics 有効にされた統計種別のコードが入る配列です。 有効な値は: d = N個別統計を表す、 f = 関数従属統計を表す、 m = 最も共通した値(MCV)を表す、 e = 統計情報を表す。

stxexprs pg_node_tree

Expression trees (in <function>nodeToString()</function> representation) for statistics object attributes that are not simple column references. This is a list with one element per expression. Null if all statistics object attributes are simple references. 単純な列参照ではないオブジェクト属性の統計情報に対する(nodeToString()表現による)演算式ツリー。 これは一つの演算式に対して一つの項目であるリストです。 すべての統計情報オブジェクト属性が単純な参照ならばNULLです。


The <structname>pg_statistic_ext</structname> entry is filled in completely during <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link>, but the actual statistical values are not computed then. Subsequent <link linkend="sql-analyze"><command>ANALYZE</command></link> commands compute the desired values and populate an entry in the <link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link> catalog. CREATE STATISTICSの実行中にpg_statistic_extエントリはすべて満たされますが、実際の統計データ値は計算されません。 あとで実行されるANALYZEコマンドが必要な値を計算し、pg_statistic_ext_dataカタログのエントリに投入します。