

 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\$1AGGR
<a name="r_STL_AGGR"></a>

分析查詢的彙總執行步驟。在執行彙總函數和 GROUP BY 子句期間，即會進行這些步驟。

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

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

## 資料表欄
<a name="r_STL_AGGR-table-columns2"></a>

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

## 範例查詢
<a name="r_STL_AGGR-sample-queries2"></a>

傳回 SLICE 1 和 TBL 239 之彙總執行步驟的相關資訊。

```
select query, segment, bytes, slots, occupied, maxlength, is_diskbased, workmem, type
from stl_aggr where slice=1 and tbl=239
order by rows
limit 10;
```

```
 query | segment | bytes |  slots  | occupied | maxlength | is_diskbased |  workmem  |  type
-------+---------+-------+---------+----------+-----------+--------------+-----------+--------
   562 |       1 |     0 | 4194304 |        0 |         0 | f            | 383385600 | HASHED
   616 |       1 |     0 | 4194304 |        0 |         0 | f            | 383385600 | HASHED
   546 |       1 |     0 | 4194304 |        0 |         0 | f            | 383385600 | HASHED
   547 |       0 |     8 |       0 |        0 |         0 | f            |         0 | PLAIN
   685 |       1 |    32 | 4194304 |        1 |         0 | f            | 383385600 | HASHED
   652 |       0 |     8 |       0 |        0 |         0 | f            |         0 | PLAIN
   680 |       0 |     8 |       0 |        0 |         0 | f            |         0 | PLAIN
   658 |       0 |     8 |       0 |        0 |         0 | f            |         0 | PLAIN
   686 |       0 |     8 |       0 |        0 |         0 | f            |         0 | PLAIN
   695 |       1 |    32 | 4194304 |        1 |         0 | f            | 383385600 | HASHED
(10 rows)
```