

 从补丁 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="diagnostic-queries-for-query-tuning"></a>

使用以下查询发现与可能影响查询性能的查询或基础表有关的问题。我们建议将这些查询与[查询分析和改进](c-query-tuning.md)中讨论的查询优化过程结合使用。

**注意**  
这些查询适用于 Amazon Redshift 预置集群。这些查询不适用于 Redshift Serverless 工作组。

**Topics**
+ [确定最适合优化的查询](identify-queries-that-are-top-candidates-for-tuning.md)
+ [确定具有数据偏斜或未排序行的表](identify-tables-with-data-skew-or-unsorted-rows.md)
+ [确定具有嵌套循环的查询](identify-queries-with-nested-loops.md)
+ [查看查询的队列等待时间](review-queue-wait-times-for-queries.md)
+ [按表查看查询警报](review-query-alerts-by-table.md)
+ [确定统计数据缺失的表](identify-tables-with-missing-statistics.md)