i would like to know whether running msck repair <table>
on table will generate table statistics for CBO when:
hive.cbo.enable=true
hive.stats.autogather=true
or do i have to use analyze <tablename> compute statistics
.
Thanks
i would like to know whether running msck repair <table>
on table will generate table statistics for CBO when:
hive.cbo.enable=true
hive.stats.autogather=true
or do i have to use analyze <tablename> compute statistics
.
Thanks
Copyright © 2021 Jogjafile Inc.
It can gather stats when running REPAIR. But it is considered as a bug because the REPAIR command runs unexpectedly slow in this case.
There are a number of related JIRAs:
HIVE-18743 HIVE-19489 HIVE-17478 SPARK-17063
hive.stats.autogather=false
before REPAIR is a workaround.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