当出现以下错误时说明有的表没有收集相关的统计信息,可使用命更新表的统计信息 analyze tablename
psql:greenplum-table-percentage/table-percentage-sql/table-percentage.sql:1:NOTICE:One or more columns in the following table(s) do not have statistics: ******
HINT: For non-partitioned tables, run analyze <table_name>(<column_list>). For partitioned tables, run analyze
生成的CSV文件格式如下
代码语言:javascript复制
表名,最大segment的行,最小segment的行,倾斜率(%),表的大小,表的分布键
datafix.enterp*******,10362661,84146,99,95GB, by (s_ext_nodenum)
data_quality.dq_qg_*******,107,1,99,26kB, by (entid)
data_quality.f_ent_*******,16495396,140377,99,5503MB, by (s_ext_nodenum)
data_quality.f_ent_*******,12777242,107989,99,7824MB, by (s_ext_nodenum)
data_quality.f_ent_*******,12759334,107950,99,7315MB, by (s_ext_nodenum)