

 Amazon Redshift 將不再支援從修補程式 198 開始建立新的 Python UDFs。現有 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/)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# STL\$1MERGEJOIN
<a name="r_STL_MERGEJOIN"></a>

分析查詢的合併聯結執行步驟。

所有使用者都可看見 STL\$1MERGEJOIN。超級使用者可以看見所有資料列；一般使用者只能看見自己的資料。如需詳細資訊，請參閱[系統資料表和檢視中資料的可見性](cm_chap_system-tables.md#c_visibility-of-data)。

**注意**  
STL\$1MERGEJOIN 僅包含在主佈建叢集上執行的查詢。但不包含在並行擴縮叢集上或無伺服器命名空間上執行的查詢。若要存取在主要叢集、並行擴縮叢集和無伺服器命名空間上執行的查詢說明計畫，建議您使用 SYS 監控檢視 [SYS\$1QUERY\$1DETAIL](SYS_QUERY_DETAIL.md)。SYS 監視檢視中的資料會格式化為更易於使用和理解。

## 資料表欄
<a name="r_STL_MERGEJOIN-table-columns"></a>

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

## 範例查詢
<a name="r_STL_MERGEJOIN-sample-queries"></a>

下列範例會傳回最新查詢的合併聯結結果。

```
select sum(s.qtysold), e.eventname
from event e, listing l, sales s
where e.eventid=l.eventid
and l.listid= s.listid
group by e.eventname;

select * from stl_mergejoin where query=pg_last_query_id();
```

```
 userid | query | slice | segment | step |         starttime   |          endtime    | tasknum | rows | tbl
--------+-------+-------+---------+------+---------------------+---------------------+---------+------+-----
    100 | 27399 |     3 |       4 |    4 | 2013-10-02 16:30:41 | 2013-10-02 16:30:41 |      19 |43428 | 240
    100 | 27399 |     0 |       4 |    4 | 2013-10-02 16:30:41 | 2013-10-02 16:30:41 |      19 |43159 | 240
    100 | 27399 |     2 |       4 |    4 | 2013-10-02 16:30:41 | 2013-10-02 16:30:41 |      19 |42778 | 240
    100 | 27399 |     1 |       4 |    4 | 2013-10-02 16:30:41 | 2013-10-02 16:30:41 |      19 |43091 | 240
```