确定统计数据缺失的表 - Amazon Redshift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

确定统计数据缺失的表

以下查询提供了对缺少统计信息的表运行的查询的计数。如果此查询返回任何行,请查看 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;