The <filename>pg_overexplain</filename> module extends <command>EXPLAIN</command>
with new options that provide additional output. It is mostly intended to
assist with debugging of and development of the planner, rather than for
general use. Since this module displays internal details of planner data
structures, it may be necessary to refer to the source code to make sense
of the output. Furthermore, the output is likely to change whenever (and as
often as) those data structures change.
《機械翻訳》pg_overexplain
モジュールは、追加の出力を提供する新しいオプションで拡張されます。
これは、一般的な使用ではなく、主にプランナのデバッグと開発を支援することを目的としています。
このモジュールはプランナデータ構造の内部詳細を表示するため、出力のソースコード対makeの意味を参照する必要がある場合があります。
さらに、これらのデータ構造が変更されるたびにEXPLAIN
および同じ頻度で出力が変更される可能性があります。
To use it, simply load it into the server. You can load it into an individual session: 《機械翻訳》使用するには、サーバにロードするだけです。 個別のセッションにロードすることもできます。
LOAD 'pg_overexplain';
You can also preload it into some or all sessions by including
<literal>pg_overexplain</literal> in
<xref linkend="guc-session-preload-libraries"/> or
<xref linkend="guc-shared-preload-libraries"/> in
<filename>postgresql.conf</filename>.
《機械翻訳》また、postgresql.conf
にsession_preload_librariesのpg_overexplain
を含めるか、にshared_preload_librariesを含めることで、セッションの一部またはすべてをプリロードすることもできます。
The <literal>DEBUG</literal> option displays miscellaneous information from
the plan tree that is not normally shown because it is not expected to be
of general interest. For each individual plan node, it will display the
following fields. See <literal>Plan</literal> in
<literal>nodes/plannodes.h</literal> for additional documentation of these
fields.
《機械翻訳》DEBUG
オプションを選択すると、計画ツリーのその他の情報が表示されます。
これらの情報は、一般的な関心事項ではないため、通常は表示されません。
個々のプランノードごとに、次のフィールドがディスプレイされます。
これらのフィールドの追加文書については、nodes/plannodes.h
のを参照してください。
Plan
<literal>Disabled Nodes</literal>. Normal <command>EXPLAIN</command>
determines whether a node is disabled by checking whether the node's
count of disabled nodes is larger than the sum of the counts for the
underlying nodes. This option shows the raw counter value.
《機械翻訳》Disabled Nodes
.Normal EXPLAIN
無効なノードのノードのカウントが、基礎となるノードのカウントのノードよりも大きいかどうかをチェックすることによって、総和が無効になっているかどうかを判断します。
このオプションは、生のカウンタ値を示します。
<literal>Parallel Safe</literal>. Indicates whether it would be safe for
a plan tree node to appear beneath a <literal>Gather</literal> or
<literal>Gather Merge</literal> node, regardless of whether it is
actually below such a node.
《機械翻訳》Parallel Safe
.計画ツリーノードがGather
またはGather Merge
ノードの下に表示される場合、実際にそのようなノードの下にあるかどうかに関係なく、セーフであるかどうかを示します。
<literal>Plan Node ID</literal>. An internal ID number that should be
unique for every node in the plan tree. It is used to coordinate parallel
query activity.
《機械翻訳》Plan Node ID
.計画ツリー内のすべてのノードに対してユニークである必要がある内部ID番号。
パラレル問い合わせ活動を調整するために使用されます。
<literal>extParam</literal> and <literal>allParam</literal>. Information
about which numbered parameters affect this plan node or its children. In
text mode, these fields are only displayed if they are non-empty sets.
《機械翻訳》extParam
およびallParam
。
このプランノードまたはその子に影響を与える番号付きパラメータに関する情報。
テキストモードでは、これらのフィールドは空のセットでない場合にのみ表示されます。
Once per query, the <literal>DEBUG</literal> option will display the
following fields. See <literal>PlannedStmt</literal> in
<literal>nodes/plannodes.h</literal> for additional detail.
《機械翻訳》問い合わせごとに1回、DEBUG
オプションを使用すると、次のフィールドがディスプレイされます。
詳細については、PlannedStmt
のを参照してください。
nodes/plannodes.h
<literal>Command Type</literal>. For example, <literal>select</literal>
or <literal>update</literal>.
《機械翻訳》Command Type
.例の場合、select
またはupdate
.
<literal>Flags</literal>. A comma-separated list of Boolean structure
member names from the <literal>PlannedStmt</literal> that are set to
<literal>true</literal>. It covers the following structure members:
<literal>hasReturning</literal>, <literal>hasModifyingCTE</literal>,
<literal>canSetTag</literal>, <literal>transientPlan</literal>,
<literal>dependsOnRole</literal>, <literal>parallelModeNeeded</literal>.
《機械翻訳》Flags
.true
に設定されているからのブール構造カンマ名のリストで区切られたメンバ。
次の構造メンバが含まれます:hasReturning
,hasModifyingCTE
,canSetTag
,transientPlan
,dependsOnRole
,parallelModeNeeded
。
PlannedStmt
<literal>Subplans Needing Rewind</literal>. Integer IDs of subplans that
may need to be rewound by the executor.
《機械翻訳》Subplans Needing Rewind
整数による巻き戻しが必要な可能性があるサブプランのエグゼキュータID。
<literal>Relation OIDs</literal>. OIDs of relations upon which this plan
depends.
《機械翻訳》Relation OIDs
このプランが依存しているリレーションのOID。
<literal>Executor Parameter Types</literal>. Type OID for each executor parameter
(e.g. when a nested loop is chosen and a parameter is used to pass a value down
to an inner index scan). Does not include parameters supplied to a prepared
statement by the user.
《機械翻訳》Executor Parameter Types
各タイプoidのエグゼキュータパラメータたとえば、ネステッドループが選択され、パラメータが値ダウンを内部インデックススキャンに渡すために使用される場合。
includeは、ユーザによって提供されるをプリペアドステートメントにパラメータ設定しません。
<literal>Parse Location</literal>. Location within the query string
supplied to the planner where this query's text can be found. May be
<literal>Unknown</literal> in some contexts. Otherwise, may be
<literal>NNN to end</literal> for some integer <literal>NNN</literal> or
<literal>NNN for MMM bytes</literal> for some integers
<literal>NNN</literal> and <literal>MMM</literal>.
《機械翻訳》Parse Location
。
問い合わせー文字列提供される内で、このプランナのテキストを見つけることができる問い合わせの場所。
コンテキストによってはUnknown
になる場合もあります。
それ以外の場合は、NNN to end
いくつかの整数に対してNNN
またはNNN for MMM bytes
いくつかの整数に対してNNN
およびMMM
になる場合もあります。
The <literal>RANGE_TABLE</literal> option displays information from the
plan tree specifically concerning the query's range table. Range table
entries correspond roughly to items appearing in the query's
<literal>FROM</literal> clause, but with numerous exceptions. For example,
subqueries that are proved unnecessary may be deleted from the range table
entirely, while inheritance expansion adds range table entries for child
tables that are not named directly in the query.
《機械翻訳》RANGE_TABLE
オプションは、特に計画ツリーのレンジテーブルに関する問い合わせからの情報を表示します。
レンジテーブルエントリは、問い合わせFROM
句に表示される項目にほぼ対応していますが、多くの例外があります。
例の場合、不要であることが証明されたサブ問い合わせはレンジテーブルから完全に削除される可能性がありますが、継承展開は、問い合わせに直接記名的ではない子テーブルのレンジテーブルエントリを追加します。
Range table entries are generally referenced within the query plan by a
range table index, or RTI. Plan nodes that reference one or more RTIs will
be labelled accordingly, using one of the following fields: <literal>Scan
RTI</literal>, <literal>Nominal RTI</literal>, <literal>Exclude Relation
RTI</literal>, <literal>Append RTIs</literal>.
《機械翻訳》レンジテーブルエントリは、通常、被参照インデックスまたはRTIによる問い合わせプラン内のレンジテーブルです。
計画ノードでは、次のフィールドのいずれかを使用して、1つ以上のRTIに適切なラベルが付けられます:Scan RTI
、Nominal RTI
、Exclude Relation RTI
、Append RTIs
。
リファレンス
In addition, the query as a whole may maintain lists of range table indexes
that are needed for various purposes. These lists will be displayed once
per query, labelled as appropriate as <literal>Unprunable RTIs</literal> or
<literal>Result RTIs</literal>. In text mode, these fields are only
displayed if they are non-empty sets.
《機械翻訳》さらに、問い合わせは全体として、様々な目的に必要なレンジテーブル索引のリストを保持できます。
これらのリストは、必要に応じてUnprunable RTIs
またはResult RTIs
とラベル付けされ、問い合わせごとに1回表示されます。
テキストモードでは、これらのフィールドは空のセットでない場合にのみ表示されます。
Finally, but most importantly, the <literal>RANGE_TABLE</literal> option
will display a dump of the query's entire range table. Each range table
entry is labelled with the appropriate range table index, the kind of range
table entry (e.g. <literal>relation</literal>,
<literal>subquery</literal>, or <literal>join</literal>), followed by the
contents of various range table entry fields that are not normally part of
<literal>EXPLAIN</literal> output. Some of these fields are only displayed
for certain kinds of range table entries. For example,
<literal>Eref</literal> is displayed for all types of range table entries,
but <literal>CTE Name</literal> is displayed only for range table entries
of type <literal>cte</literal>.
《機械翻訳》最後になりますが、最も重要なことは、RANGE_TABLE
オプションが問い合わせの全レンジテーブルのダンプをディスプレイすることです。
各レンジテーブルエントリには、適切なレンジテーブルインデックス、レンジテーブルエントリの種類relation
、subquery
またはjoin
などの後に、通常はパートではないEXPLAIN
出力様々なレンジテーブルエントリフィールドの内容が続きます。
これらのフィールドの一部は、特定の種類のレンジテーブルエントリに対してのみ表示されます。
例では、Eref
はすべてのタイプのレンジテーブルエントリに対して表示されますが、CTE Name
はタイプcte
のレンジテーブルエントリに対してのみ表示されます。
For more information about range table entries, see the definition of
<literal>RangeTblEntry</literal> in <literal>nodes/plannodes.h</literal>.
《機械翻訳》レンジテーブルエントリの詳細については、nodes/plannodes.h
内のの定義を参照してください。
RangeTblEntry