我想知道msck repair <table>
在以下情况下在表上运行是否会为 CBO 生成表统计信息:
hive.cbo.enable=true
hive.stats.autogather=true
还是我必须使用analyze <tablename> compute statistics
.
谢谢
我想知道msck repair <table>
在以下情况下在表上运行是否会为 CBO 生成表统计信息:
hive.cbo.enable=true
hive.stats.autogather=true
还是我必须使用analyze <tablename> compute statistics
.
谢谢
它可以在运行 REPAIR 时收集统计信息。但它被认为是一个错误,因为在这种情况下 REPAIR 命令运行异常缓慢。
有许多相关的 JIRA:
HIVE-18743 HIVE-19489 HIVE-17478 SPARK-17063
hive.stats.autogather=false
在修复之前是一种解决方法。
由于它被认为是一个错误,因此您最好不要依赖此功能,并在必要时进行分析。