简体   繁体   English

msck 是否修复触发表统计信息生成

[英]Does msck repair trigger table statistics generation

i would like to know whether running msck repair <table> on table will generate table statistics for CBO when:我想知道在表上运行msck repair <table>是否会在以下情况下为 CBO 生成表统计信息:

hive.cbo.enable=true

hive.stats.autogather=true

or do i have to use analyze <tablename> compute statistics .还是我必须使用analyze <tablename> compute statistics

Thanks谢谢

It can gather stats when running REPAIR.它可以在运行 REPAIR 时收集统计信息。 But it is considered as a bug because the REPAIR command runs unexpectedly slow in this case.但它被认为是一个错误,因为在这种情况下 REPAIR 命令运行异常缓慢。

There are a number of related JIRAs:有许多相关的 JIRA:

HIVE-18743 HIVE-19489 HIVE-17478 SPARK-17063 HIVE-18743 HIVE-19489 HIVE-17478 SPARK-17063

hive.stats.autogather=false before REPAIR is a workaround. hive.stats.autogather=false之前 REPAIR 是一种解决方法。

Since it is considered like a bug, you better do not rely on this feature and do analyze when necessary.由于它被认为是一个错误,因此您最好不要依赖此功能并在必要时进行分析。

Found this related question: https://stackoverflow.com/a/57885181/2700344发现这个相关问题: https://stackoverflow.com/a/57885181/2700344

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM