

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://www.amazonaws.cn/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# 确定具有嵌套循环的查询
<a name="identify-queries-with-nested-loops"></a>

以下查询标识已为嵌套循环记录提示事件的查询。有关如何修复嵌套循环条件的信息，请参阅[嵌套循环](query-performance-improvement-opportunities.md#nested-loop)。

```
select query, trim(querytxt) as SQL, starttime 
from stl_query 
where query in (
select distinct query 
from stl_alert_event_log 
where event like 'Nested Loop Join in the query plan%') 
order by starttime desc;
```