

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://amazonaws-china.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>

Analyzes aggregate execution steps for queries. These steps occur during execution of aggregate functions and GROUP BY clauses.

STL\$1AGGR is visible to all users. Superusers can see all rows; regular users can see only their own data. For more information, see [Visibility of data in system tables and views](cm_chap_system-tables.md#c_visibility-of-data).

**Note**  
STL\$1AGGR only contains queries run on main provisioned clusters. It doesn't contain queries run on concurrency scaling clusters or on serverless namespaces. To access explain plans for queries run on both main clusters, concurrency scaling clusters, and serverless namespaces, we recommend that you use the SYS monitoring view [SYS\$1QUERY\$1DETAIL](SYS_QUERY_DETAIL.md). The data in the SYS monitoring view is formatted to be easier to use and understand.

## Table columns
<a name="r_STL_AGGR-table-columns2"></a>

[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/redshift/latest/dg/r_STL_AGGR.html)

## Sample queries
<a name="r_STL_AGGR-sample-queries2"></a>

Returns information about aggregate execution steps for SLICE 1 and 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)
```