[CP] refine cost of base table
This commit is contained in:
@ -535,6 +535,20 @@ bool ObSQLSessionInfo::is_var_assign_use_das_enabled() const
|
||||
return bret;
|
||||
}
|
||||
|
||||
int ObSQLSessionInfo::is_adj_index_cost_enabled(bool &enabled, int64_t &stats_cost_percent) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
enabled = false;
|
||||
stats_cost_percent = 0;
|
||||
int64_t tenant_id = get_effective_tenant_id();
|
||||
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(tenant_id));
|
||||
if (tenant_config.is_valid()) {
|
||||
stats_cost_percent = tenant_config->optimizer_index_cost_adj;
|
||||
enabled = (0 != stats_cost_percent);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObSQLSessionInfo::destroy(bool skip_sys_var)
|
||||
{
|
||||
if (is_inited_) {
|
||||
|
||||
@ -1167,6 +1167,7 @@ public:
|
||||
bool is_index_skip_scan_enabled() const;
|
||||
int is_enable_range_extraction_for_not_in(bool &enabled) const;
|
||||
bool is_var_assign_use_das_enabled() const;
|
||||
int is_adj_index_cost_enabled(bool &enabled, int64_t &stats_cost_percent) const;
|
||||
|
||||
ObSessionDDLInfo &get_ddl_info() { return ddl_info_; }
|
||||
void set_ddl_info(const ObSessionDDLInfo &ddl_info) { ddl_info_ = ddl_info; }
|
||||
|
||||
Reference in New Issue
Block a user