カテゴリ:

システム関数 (クエリ情報)、 テーブル関数

GET_QUERY_OPERATOR_STATS

完了したクエリ内の個別のクエリ演算子に関する統計を返します。この関数は、過去14日間に実行された任意の完了したクエリに対して実行できます。

You can use this information to understand the structure of a query and identify query operators --- for example, the join operator --- that cause performance problems.

For example, you can use this information to determine which operators are consuming the most resources. As another example, you can use this function to identify joins that have more output rows than input rows, which can be a sign of an "exploding" join; for example, an unintended Cartesian product.

これらの統計は、 Snowsight の クエリプロファイル タブでも利用できます。GET_QUERY_OPERATOR_STATS() 関数は、同じ情報をプログラムによるインターフェイス経由で利用できるようにします。

問題のあるクエリ演算子を見つける方法の詳細については、 クエリプロファイルによって特定される一般的なクエリの問題 をご参照ください。

構文

GET_QUERY_OPERATOR_STATS( <query_id> )
Copy

引数

query_id

クエリの ID。次を使用できます。

  • 文字列リテラル(一重引用符で囲まれた文字列)。

  • クエリ ID を含む セッション変数

  • LAST_QUERY_ID 関数の呼び出しからの戻り値。

戻り値

GET_QUERY_OPERATOR_STATS 関数は テーブル関数。クエリ内の各クエリ演算子に関する統計を含む行を返します。詳細については、以下の 出力使用上の注意 セクションをご参照ください。

使用上の注意

  • This function returns statistics only for queries that have completed.

  • クエリを実行したウェアハウスに対する OPERATE または MONITOR の権限が必要です。

  • This function provides detailed statistics about each query operator used in the specified query. The following list shows the possible query operators:

    • Aggregate: 入力をグループ化し、集計関数を計算します。

    • CartesianJoin: 特殊な結合の型。

    • Delete: テーブルから記録を削除します。

    • ExternalFunction: 外部関数による処理を表します。

    • ExternalScan: ステージオブジェクトに保存されているデータへのアクセスを表します。

    • Filter: 記録をフィルターする操作を表します。

    • Flatten: VARIANT 記録を処理し、場合によっては指定されたパスでそれらをフラット化します。

    • Generator: Generates records by using the TABLE(GENERATOR(...)) construct.

    • GroupingSets: Represents constructs, such as GROUPING SETS, ROLLUP, and CUBE.

    • Insert: INSERT または COPY 操作のいずれかにより、テーブルに記録を追加します。

    • InternalObject: Represents access to an internal data object; for example, in an Information Schema or the result of a previous query.

    • Join: 特定の条件で2つの入力を結合します。

    • JoinFilter: クエリプランでさらに結合の条件に一致しない可能性があると識別できるタプルを削除する特別なフィルタリング操作。

    • Merge: テーブルで MERGE 操作を実行します。

    • Pivot: 列の一意の値を複数の列に変換し、必要な集計を実行します。

    • Result: クエリ結果を返します。

    • Sort: 特定の式の入力を順序付けます。

    • SortWithLimit: ソート後に入力シーケンスの一部、通常は ORDER BY ... LIMIT ... OFFSET ... 構築の結果を生成します。

    • TableScan: 単一のテーブルへのアクセスを表します。

    • UnionAll:2つの入力を連結します。

    • Unload: ステージ内のテーブルからファイルにデータをエクスポートする COPY 操作を表します。

    • Unpivot: 列を行に変換することにより、テーブルを回転します。

    • Update: テーブル内の記録を更新します。

    • ValuesClause: VALUES 句で提供される値のリスト。

    • WindowFunction: ウィンドウ関数を計算します。

    • WithClause: SELECT ステートメントの本文より優先され、1つ以上の CTEs を定義します。

    • WithReference: WITH 句のインスタンス。

  • 情報はテーブルとして返されます。テーブルの各行は、1つの演算子に対応します。行には、その演算子の実行の内訳とクエリ統計が含まれます。

    行には、 演算子の属性 もリストされる場合があります(これらは演算子の型によって異なります)。

    Statistics that break down query execution time are expressed as a percentage of the total query execution time.

    特定の統計の詳細については、 出力 (このトピック内)をご参照ください。

  • この関数はテーブル関数であるため、 FROM 句で使用し、 TABLE() でラップする必要があります。例:

    SELECT * FROM TABLE(GET_QUERY_OPERATOR_STATS(last_query_id()));
    
    Copy
  • 特定のクエリ(つまり、特定の UUID)の個別な実行に対してこの関数は決定論的です。毎回同じ値を返します。

    ただし、同じクエリテキストを別の方法で実行すると、この関数は別のランタイム統計を返す可能性があります。統計は多くの要因に依存します。次の要因は、実行に大きな影響を与える可能性があるため、この関数によって返される統計にも大きな影響を与える可能性があります。

    • データの量。

    • マテリアライズドビュー の可用性と、それらのマテリアライズドビューが最後に更新されてからのデータへの変更(ある場合)。

    • クラスタリング の有無。

    • 以前にキャッシュされたデータの有無。

    • 仮想ウェアハウスのサイズ。

    値は、ユーザーのクエリやデータ以外の要因によっても影響を受ける可能性があります。通常、これらの要因が及ぼす影響は大きくありません。次の要因が含まれます。

    • 仮想ウェアハウスの初期化時間。

    • 外部関数の待機時間。

出力

この関数は、次の列を返します。

Column name

Data type

説明

QUERY_ID

VARCHAR

SQL ステートメントのための内部、システム生成識別子であるクエリ ID。

STEP_ID

NUMBER(38, 0)

クエリプラン内のステップの識別子。

OPERATOR_ID

NUMBER(38, 0)

演算子の識別子。これはクエリ内で一意です。値は0から始まります。

PARENT_OPERATORS

1つ以上の NUMBER(38, 0)を含む ARRAY

この演算子の親演算子の識別子。これがクエリプランの最後の演算子(通常は結果演算子)の場合は NULL。

OPERATOR_TYPE

VARCHAR

The type of query operator; for example, TableScan or Filter.

OPERATOR_STATISTICS

OBJECT を含む VARIANT

Statistics about the operator (for example, the number of output rows from the operator).

EXECUTION_TIME_BREAKDOWN

OBJECT を含む VARIANT

演算子の実行時間に関する情報。

OPERATOR_ATTRIBUTES

OBJECT を含む VARIANT

Information about the operator. This information depends on the operator type.

演算子の特定の列に関する情報がない場合、値は NULL です。

Three of these columns contain OBJECTs. Each object contains key/value pairs. The tables below describe the keys in these objects.

OPERATOR_STATISTICS

OPERATOR_STATISTICS 列の OBJECTs にあるフィールドは、演算子に関する追加情報を提供します。情報には次が含まれます。

キー

Nested key (if applicable)

Data type

説明

dml

Statistics for Data Manipulation Language (DML) queries.

number_of_rows_inserted

DOUBLE

Number of rows inserted into a table or tables.

number_of_rows_updated

DOUBLE

Number of rows updated in a table.

number_of_rows_deleted

DOUBLE

Number of rows deleted from a table.

number_of_rows_unloaded

DOUBLE

Number of rows unloaded during data export.

extension_functions

Information about calls to extension functions. If the value of a field is zero, then the field is not displayed.

Java UDF handler load time

DOUBLE

Amount of time for the Java UDF handler to load.

Total Java UDF handler invocations

DOUBLE

Number of times the Java UDF handler is invoked.

Max Java UDF handler execution time

DOUBLE

Maximum amount of time for the Java UDF handler to execute.

Avg Java UDF handler execution time

DOUBLE

Average amount of time to execute the Java UDF handler.

Java UDTF process() invocations

DOUBLE

Number of times the Java UDTF process method was invoked.

Java UDTF process() execution time

DOUBLE

Amount of time to execute the Java UDTF process.

Avg Java UDTF process() execution time

DOUBLE

Average amount of time to execute the Java UDTF process.

Java UDTF's constructor invocations

DOUBLE

Number of times the Java UDTF constructor was invoked.

Java UDTF's constructor execution time

DOUBLE

Amount of time to execute the Java UDTF constructor.

Avg Java UDTF's constructor execution time

DOUBLE

Average amount of time to execute the Java UDTF constructor.

Java UDTF endPartition() invocations

DOUBLE

Number of times the Java UDTF endPartition method was invoked.

Java UDTF endPartition() execution time

DOUBLE

Amount of time to execute the Java UDTF endPartition method.

Avg Java UDTF endPartition() execution time

DOUBLE

Average amount of time to execute the Java UDTF endPartition method.

Max Java UDF dependency download time

DOUBLE

Maximum amount of time to download the Java UDF dependencies.

Max JVM memory usage

DOUBLE

Peak memory usage as reported by the JVM.

Java UDF inline code compile time in ms

DOUBLE

Compile time for the Java UDF inline code.

Total Python UDF handler invocations

DOUBLE

Number of times the Python UDF handler was invoked.

Total Python UDF handler execution time

DOUBLE

Total execution time for the Python UDF handler.

Avg Python UDF handler execution time

DOUBLE

Average amount of time to execute the Python UDF handler.

Python sandbox max memory usage

DOUBLE

Peak memory usage by the Python sandbox environment.

Avg Python env creation time: Download and install packages

DOUBLE

Average amount of time to create the Python environment, including downloading and installing packages.

Conda solver time

DOUBLE

Amount of time to run the Conda solver to solve Python packages.

Conda env creation time

DOUBLE

Amount of time to create the Python environment.

Python UDF initialization time

DOUBLE

Amount of time to initialize the Python UDF.

Number of external file bytes read for UDFs

DOUBLE

Number of external file bytes read for UDFs.

Number of external files accessed for UDFs

DOUBLE

Number of external files accessed for UDFs.

external_functions

Information about calls to external functions. If the value of a field --- for example retries_due_to_transient_errors --- is zero, then the field is not displayed.

total_invocations

DOUBLE

Number of times that an external function was called. This number can be different from the number of external function calls in the text of the SQL statement because of the number of batches that rows are divided into, the number of retries if there are transient network problems, and so on.

rows_sent

DOUBLE

Number of rows sent to external functions.

rows_received

DOUBLE

Number of rows received back from external functions.

bytes_sent (x-region)

DOUBLE

Number of bytes sent to external functions. If the key includes (x-region), the data was sent across regions, which can impact billing.

bytes_received (x-region)

DOUBLE

Number of bytes received from external functions. If the key includes (x-region), the data was sent across regions, which can impact billing.

retries_due_to_transient_errors

DOUBLE

Number of retries because of transient errors.

average_latency_per_call

DOUBLE

Average amount of time per invocation (call) in milliseconds between the time Snowflake sent the data and received the returned data.

http_4xx_errors

INTEGER

4xxステータスコードを返した HTTP リクエストの合計数。

http_5xx_errors

INTEGER

5xxステータスコードを返した HTTP リクエストの合計数。

average_latency

DOUBLE

HTTP リクエストに成功した場合の平均遅延時間。

avg_throttle_latency_overhead

DOUBLE

Average overhead per successful request because of a slowdown caused by throttling (HTTP 429).

batches_retried_due_to_throttling

DOUBLE

Number of batches that were retried because of HTTP 429 errors.

latency_per_successful_call_(p50)

DOUBLE

成功した HTTP リクエストの50パーセンタイルの遅延。成功したすべてのリクエストの50%で、完了までにかかった時間がこの時間未満。

latency_per_successful_call_(p90)

DOUBLE

成功した HTTP リクエストの90パーセンタイルの遅延。成功したすべてのリクエストの90%で、完了までにかかった時間がこの時間未満。

latency_per_successful_call_(p95)

DOUBLE

成功した HTTP リクエストの95パーセンタイルの遅延。成功したすべてのリクエストの95%で、完了までにかかった時間がこの時間未満。

latency_per_successful_call_(p99)

DOUBLE

成功した HTTP リクエストの99パーセンタイルの遅延。成功したすべてのリクエストの99%で、完了までにかかった時間がこの時間未満。

input_rows

INTEGER

Number of input rows. This can be missing for an operator with no input edges from other operators.

io

クエリ中に実行されるI/O(入出力)操作に関する情報。

scan_progress

DOUBLE

Percentage of data scanned for a given table so far.

bytes_scanned

DOUBLE

Number of bytes scanned so far.

percentage_scanned_from_cache

DOUBLE

Percentage of data scanned from the local disk cache.

bytes_written

DOUBLE

Bytes written; for example, when loading into a table.

bytes_written_to_result

DOUBLE

結果オブジェクトに書き込まれるバイト数。

For example, SELECT * FROM ... would produce a set of results in tabular format representing each field in the selection.

一般に、結果オブジェクトは、なんであれクエリの結果として生成されるものを表し、 bytes_written_to_result は、返される結果のサイズを表します。

bytes_read_from_result

DOUBLE

結果オブジェクトから読み取ったバイト数。

external_bytes_scanned

DOUBLE

Bytes read from an external object; for example, a stage.

network

network_bytes

DOUBLE

Amount of data sent over the network.

output_rows

INTEGER

Number of output rows. This can be missing for the operator that returns the results to the user; which is usually the RESULT operator.

pruning

テーブルのプルーニングに関する情報。

partitions_pruned_by_snowflake_optima

DOUBLE

Number of partitions pruned by Snowflake Optima.

partitions_scanned

DOUBLE

Number of partitions scanned so far.

partitions_total

DOUBLE

Total number of partitions in a given table.

spilling

中間結果がメモリに収まらない操作のディスク使用量に関する情報。

bytes_spilled_remote_storage

DOUBLE

Volume of data spilled to remote disk.

bytes_spilled_local_storage

DOUBLE

Volume of data spilled to local disk.

search_optimization

検索最適化サービス を使用するクエリに関する情報。

partitions_pruned_by_search_optimization

DOUBLE

Number of partitions pruned by search optimization.

partitions_pruned_by_search_optimization_and_snowflake_optima

DOUBLE

検索最適化およびSnowflake Optimaによって排除されたパーティションの数。

EXECUTION_TIME_BREAKDOWN

EXECUTION_TIME_BREAKDOWN 列の OBJECTs にあるフィールドを以下に示します。

キー

Data type

説明

overall_percentage

DOUBLE

Percentage of the total query time spent by this operator.

initialization

DOUBLE

クエリ処理の設定にかかった時間。

processing

DOUBLE

CPU によるデータの処理にかかった時間。

synchronization

DOUBLE

関与しているプロセス間のアクティビティの同期に費やされた時間。

local_disk_io

DOUBLE

ローカルディスクアクセスの待機中に処理がブロックされた時間。

remote_disk_io

DOUBLE

リモートディスクアクセスの待機中に処理がブロックされた時間。

network_communication

DOUBLE

処理がネットワークデータ転送を待機していた時間。

OPERATOR_ATTRIBUTES

Each output row describes one operator in the query. The following table shows the possible types of operators; for example, the Filter operator. For each type of operator, the table shows the possible attributes; for example, the expression used to filter the rows.

演算子の属性は、 VARIANT 型で OBJECT を含む OPERATOR_ATTRIBUTES 列に格納されます。OBJECT にはキーと値のペアが含まれています。各キーは、演算子の属性1つに対応します。

Operator name

キー

Data type

説明

Aggregate

functions

VARCHAR の ARRAY

コンピューティングされた関数のリスト。

grouping_keys

VARCHAR の ARRAY

Group-by expression.

CartesianJoin

additional_join_condition

VARCHAR

非等価結合式。

equality_join_condition

VARCHAR

等値結合式。

join_type

VARCHAR

結合の型(INNER)。

Delete

table_name

VARCHAR

更新されたテーブルの名前。

ExternalScan

stage_name

VARCHAR

データが読み取られるステージの名前。

stage_type

VARCHAR

ステージのタイプ。

Filter

filter_condition

VARCHAR

データのフィルターに使用される式。

Flatten

input

VARCHAR

Input expression used to flatten data.

Generator

row_count

NUMBER

入力パラメーター ROWCOUNT の値。

time_limit

NUMBER

入力パラメーター TIMELIMIT の値。

GroupingSets

functions

VARCHAR の ARRAY

コンピューティングされた関数のリスト。

key_sets

VARCHAR の ARRAY

グループ化セットのリスト。

Insert

input_expression

VARCHAR

挿入される式。

table_names

VARCHAR の ARRAY

記録が追加されるテーブル名のリスト。

InternalObject

object_name

VARCHAR

Name of the accessed object.

Join

additional_join_condition

VARCHAR

非等価結合式。

equality_join_condition

VARCHAR

等値結合式。

join_type

VARCHAR

結合の型(INNER、 OUTER、 LEFT、 JOIN など)

JoinFilter

join_id

NUMBER

Operator id of the join used to identify tuples that can be filtered out.

Merge

table_name

VARCHAR

更新されたテーブルの名前。

Pivot

grouping_keys

VARCHAR の ARRAY

結果が集計される残りの列。

pivot_column

VARCHAR の ARRAY

ピボット値の結果の列。

Result

expressions

VARCHAR の ARRAY

生成された式。

Sort

sort_keys

VARCHAR の ARRAY

ソート順を定義する式。

SortWithLimit

offset

NUMBER

生成されたタプルが発行される順序付けられたシーケンス内の位置。

rows

NUMBER

生成された行の数。

sort_keys

VARCHAR の ARRAY

ソート順を定義する式。

TableScan

columns

VARCHAR の ARRAY

スキャンされた列のリスト

extracted_variant_paths

VARCHAR の ARRAY

バリアント列から抽出されたパスのリスト。

table_alias

VARCHAR

アクセスされているテーブルのエイリアス。

table_name

VARCHAR

アクセスされているテーブルの名前。

Unload

location

VARCHAR

データが保存されるステージ。

Unpivot

expressions

VARCHAR の ARRAY

ピボット解除クエリの出力列。

Update

table_name

VARCHAR

更新されたテーブルの名前。

ValuesClause

value_count

NUMBER

生成された値の数。

values

VARCHAR

値のリスト。

WindowFunction

functions

VARCHAR の ARRAY

コンピューティングされた関数のリスト。

WithClause

name

VARCHAR

WITH 句のエイリアス。

演算子がリストされていない場合は、属性が生成されず、値は {} として報告されます。

注釈

  • The following operators do not have any operator attributes and therefore are not included in the table of OPERATOR_ATTRIBUTES:

    • UnionAll

    • ExternalFunction

以下の例では、GET_QUERY_OPERATOR_STATS関数を呼びだしています。

単一のクエリに関するデータの取得

この例は、2つの小さなテーブルを結合する SELECT の統計を示しています。

SELECT ステートメントを実行します。

SELECT x1.i, x2.i
  FROM x1 INNER JOIN x2 ON x2.i = x1.i
  ORDER BY x1.i, x2.i;
Copy

クエリ ID を取得します。

SET lqid = (SELECT LAST_QUERY_ID());
Copy

GET_QUERY_OPERATOR_STATS() を呼び出して、クエリ内の個々のクエリ演算子に関する統計を取得します。

SELECT * FROM TABLE(GET_QUERY_OPERATOR_STATS($lqid));
Copy
+--------------------------------------+---------+-------------+--------------------+---------------+-----------------------------------------+-----------------------------------------------+----------------------------------------------------------------------+
| QUERY_ID                             | STEP_ID | OPERATOR_ID | PARENT_OPERATORS   | OPERATOR_TYPE | OPERATOR_STATISTICS                     | EXECUTION_TIME_BREAKDOWN                      | OPERATOR_ATTRIBUTES                                                  |
|--------------------------------------+---------+-------------+--------------------+---------------+-----------------------------------------+-----------------------------------------------+----------------------------------------------------------------------|
| 01a8f330-0507-3f5b-0000-43830248e09a |       1 |           0 |               NULL | Result        | {                                       | {                                             | {                                                                    |
|                                      |         |             |                    |               |   "input_rows": 64                      |   "overall_percentage": 0.000000000000000e+00 |   "expressions": [                                                   |
|                                      |         |             |                    |               | }                                       | }                                             |     "X1.I",                                                          |
|                                      |         |             |                    |               |                                         |                                               |     "X2.I"                                                           |
|                                      |         |             |                    |               |                                         |                                               |   ]                                                                  |
|                                      |         |             |                    |               |                                         |                                               | }                                                                    |
| 01a8f330-0507-3f5b-0000-43830248e09a |       1 |           1 |              [ 0 ] | Sort          | {                                       | {                                             | {                                                                    |
|                                      |         |             |                    |               |   "input_rows": 64,                     |   "overall_percentage": 0.000000000000000e+00 |   "sort_keys": [                                                     |
|                                      |         |             |                    |               |   "output_rows": 64                     | }                                             |     "X1.I ASC NULLS LAST",                                           |
|                                      |         |             |                    |               | }                                       |                                               |     "X2.I ASC NULLS LAST"                                            |
|                                      |         |             |                    |               |                                         |                                               |   ]                                                                  |
|                                      |         |             |                    |               |                                         |                                               | }                                                                    |
| 01a8f330-0507-3f5b-0000-43830248e09a |       1 |           2 |              [ 1 ] | Join          | {                                       | {                                             | {                                                                    |
|                                      |         |             |                    |               |   "input_rows": 128,                    |   "overall_percentage": 0.000000000000000e+00 |   "equality_join_condition": "(X2.I = X1.I)",                        |
|                                      |         |             |                    |               |   "output_rows": 64                     | }                                             |   "join_type": "INNER"                                               |
|                                      |         |             |                    |               | }                                       |                                               | }                                                                    |
| 01a8f330-0507-3f5b-0000-43830248e09a |       1 |           3 |              [ 2 ] | TableScan     | {                                       | {                                             | {                                                                    |
|                                      |         |             |                    |               |   "io": {                               |   "overall_percentage": 0.000000000000000e+00 |   "columns": [                                                       |
|                                      |         |             |                    |               |     "bytes_scanned": 1024,              | }                                             |     "I"                                                              |
|                                      |         |             |                    |               |     "percentage_scanned_from_cache": 1, |                                               |   ],                                                                 |
|                                      |         |             |                    |               |     "scan_progress": 1                  |                                               |   "table_name": "MY_DB.MY_SCHEMA.X2" |
|                                      |         |             |                    |               |   },                                    |                                               | }                                                                    |
|                                      |         |             |                    |               |   "output_rows": 64,                    |                                               |                                                                      |
|                                      |         |             |                    |               |   "pruning": {                          |                                               |                                                                      |
|                                      |         |             |                    |               |     "partitions_scanned": 1,            |                                               |                                                                      |
|                                      |         |             |                    |               |     "partitions_total": 1               |                                               |                                                                      |
|                                      |         |             |                    |               |   }                                     |                                               |                                                                      |
|                                      |         |             |                    |               | }                                       |                                               |                                                                      |
| 01a8f330-0507-3f5b-0000-43830248e09a |       1 |           4 |              [ 2 ] | JoinFilter    | {                                       | {                                             | {                                                                    |
|                                      |         |             |                    |               |   "input_rows": 64,                     |   "overall_percentage": 0.000000000000000e+00 |   "join_id": "2"                                                     |
|                                      |         |             |                    |               |   "output_rows": 64                     | }                                             | }                                                                    |
|                                      |         |             |                    |               | }                                       |                                               |                                                                      |
| 01a8f330-0507-3f5b-0000-43830248e09a |       1 |           5 |              [ 4 ] | TableScan     | {                                       | {                                             | {                                                                    |
|                                      |         |             |                    |               |   "io": {                               |   "overall_percentage": 0.000000000000000e+00 |   "columns": [                                                       |
|                                      |         |             |                    |               |     "bytes_scanned": 1024,              | }                                             |     "I"                                                              |
|                                      |         |             |                    |               |     "percentage_scanned_from_cache": 1, |                                               |   ],                                                                 |
|                                      |         |             |                    |               |     "scan_progress": 1                  |                                               |   "table_name": "MY_DB.MY_SCHEMA.X1" |
|                                      |         |             |                    |               |   },                                    |                                               | }                                                                    |
|                                      |         |             |                    |               |   "output_rows": 64,                    |                                               |                                                                      |
|                                      |         |             |                    |               |   "pruning": {                          |                                               |                                                                      |
|                                      |         |             |                    |               |     "partitions_scanned": 1,            |                                               |                                                                      |
|                                      |         |             |                    |               |     "partitions_total": 1               |                                               |                                                                      |
|                                      |         |             |                    |               |   }                                     |                                               |                                                                      |
|                                      |         |             |                    |               | }                                       |                                               |                                                                      |
+--------------------------------------+---------+-------------+--------------------+---------------+-----------------------------------------+-----------------------------------------------+----------------------------------------------------------------------+

「爆発」結合演算子の特定

次の例は、 GET_QUERY_OPERATOR_STATS を使用して複雑なクエリを調べる方法を示しています。この例では、その演算子に入力されたよりも多くの行を生成するクエリ内の演算子を検索します。

分析するクエリは次のとおりです。

SELECT *
  FROM t1
    JOIN t2 ON t1.a = t2.a
    JOIN t3 ON t1.b = t3.b
    JOIN t4 ON t1.c = t4.c;
Copy

以前のクエリのクエリ ID を取得します。

SET lid = LAST_QUERY_ID();
Copy

The following query shows the ratio of output rows to input rows for each of the join operators in the query:

SELECT  operator_id,
        operator_attributes,
        operator_statistics:output_rows / operator_statistics:input_rows AS row_multiple
  FROM TABLE(GET_QUERY_OPERATOR_STATS($lid))
  WHERE operator_type = 'Join'
  ORDER BY step_id, operator_id;
Copy
+---------+-------------+--------------------------------------------------------------------------+---------------+
| STEP_ID | OPERATOR_ID | OPERATOR_ATTRIBUTES                                                      | ROW_MULTIPLE  |
+---------+-------------+--------------------------------------------------------------------------+---------------+
|       1 |           1 | {  "equality_join_condition": "(T4.C = T1.C)",   "join_type": "INNER"  } |  49.969249692 |
|       1 |           3 | {  "equality_join_condition": "(T3.B = T1.B)",   "join_type": "INNER"  } | 116.071428571 |
|       1 |           5 | {  "equality_join_condition": "(T2.A = T1.A)",   "join_type": "INNER"  } |  12.20657277  |
+---------+-------------+--------------------------------------------------------------------------+---------------+

爆発結合を特定した後、各結合条件を調べて、条件が正しいことを確認できます。