Enabling Cost-Based Optimization
About this Task
Turning on CBO is highly recommended.
Prerequisite
You must have administrator previleges.
Steps
In Ambari, open
Services
>Hive
> Configs tab.Refer to the following table for the properties that enable CBO and assist with generating table statistics, along with the required property settings.
You can view the properties by either of these methods:
Type each property name in the Filter field in the top right corner. Open the General, Advanced hive-env, etc., sections and scan the lists of each category. Click
.If prompted to restart, restart the Hive Service.
Table 2.2. CBO Configuration Parameters
Configuration Parameter | Setting to Enable CBO | Description |
---|---|---|
| true |
Enables cost-based query optimization. |
| true |
Enables automated gathering of table-level statistics for newly created tables and table partitions, such as tables created with the INSERT OVERWRITE statement. The parameter does not produce column-level statistics, such as those generated by CBO. If disabled, administrators must manually generate the table-level statistics for newly generated tables and table partitions with the ANALYZE TABLE statement. |