

 Amazon Redshift は、パッチ 198 以降、新しい Python UDF の作成をサポートしなくなります。既存の Python UDF は、2026 年 6 月 30 日まで引き続き機能します。詳細については、[ブログ記事](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)を参照してください。

# SYS\$1QUERY\$1EXPLAIN
SYS\$1QUERY\$1EXPLAIN

実行するために送信されたクエリの EXPLAIN プランを表示します。

SYS\$1QUERY\$1EXPLAIN は、すべてのユーザーが表示可能です。スーパーユーザーはすべての行を表示できますが、通常のユーザーは自分のデータのみを表示できます。詳細については、「[システムテーブルとビューのデータの可視性](cm_chap_system-tables.md#c_visibility-of-data)」を参照してください。

## テーブルの列
テーブルの列

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/redshift/latest/dg/SYS_QUERY_EXPLAIN.html)

## サンプルクエリ
サンプルクエリ

次の例は、1 つのクエリの EXPLAIN プランです。

```
SELECT * FROM sys_query_explain WHERE query_id = 612635 ORDER BY plan_node_id;

 userid | query_id | child_query_sequence | plan_node_id | plan_parent_id |                                                                                                                                                                                                    plan_node                                                                                                                                                                                                     |                                                                                                                                                                                                    plan_info                                                                                                                                                                                                     
--------+----------+----------------------+--------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    100 |   612635 |                    1 |            1 |              0 | XN Limit  (cost=3604047533041.00..3604047533041.25 rows=100 width=20)                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                 
    100 |   612635 |                    1 |            2 |              1 |   ->  XN Merge  (cost=3604047533041.00..3604047533148.02 rows=42809 width=20)                                                                                                                                                                                                                                                                                                                                    | Merge Key: sum(b.totalprice)                                                                                                                                                                                                                                                                                                                                                                                    
    100 |   612635 |                    1 |            3 |              2 |         ->  XN Network  (cost=3604047533041.00..3604047533148.02 rows=42809 width=20)                                                                                                                                                                                                                                                                                                                            |   Send to leader                                                                                                                                                                                                                                                                                                                                                                                                
    100 |   612635 |                    1 |            4 |              3 |               ->  XN Sort  (cost=3604047533041.00..3604047533148.02 rows=42809 width=20)                                                                                                                                                                                                                                                                                                                         | Sort Key: sum(b.totalprice)                                                                                                                                                                                                                                                                                                                                                                                     
    100 |   612635 |                    1 |            5 |              4 |                     ->  XN HashAggregate  (cost=2604047529640.76..2604047529747.78 rows=42809 width=20)                                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                 
    100 |   612635 |                    1 |            6 |              5 |                           ->  XN Hash Join DS_DIST_NONE  (cost=15104956.16..2602364653507.34 rows=336575226684 width=20)                                                                                                                                                                                                                                                                                         | Hash Cond: (("outer".listid = "inner".listid) AND ("outer".sellerid = "inner".sellerid))                                                                                                                                                                                                                                                                                                                        
    100 |   612635 |                    1 |            7 |              6 |                                 ->  XN Seq Scan on listing b  (cost=0.00..7884677.12 rows=788467712 width=24)                                                                                                                                                                                                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                                 
    100 |   612635 |                    1 |            8 |              6 |                                 ->  XN Hash  (cost=7063797.76..7063797.76 rows=706379776 width=8)                                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                 
    100 |   612635 |                    1 |            9 |              8 |                                       ->  XN Seq Scan on sales a  (cost=0.00..7063797.76 rows=706379776 width=8)                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                 
(9 rows)
```