View a markdown version of this page

确定统计数据缺失的表 - Amazon Redshift

2026 年 6 月 30 日之后,Amazon Redshift 不再支持使用 Python UDF。我们将分阶段开始执行。有关 Python 生命周期终止和迁移选项详情的更多信息,请参阅 2025 年 6 月 30 日发布的博客文章

确定统计数据缺失的表

以下查询提供了对缺少统计信息的表运行的查询的计数。如果此查询返回任何行,请查看 plannode 值来确定受影响的表,然后对其运行 ANALYZE

select substring(trim(plannode),1,100) as plannode, count(*) from stl_explain where plannode like '%missing statistics%' group by plannode order by 2 desc;