Fix rowsets hint invalidation and statistical information collection performance regression
This commit is contained in:
@ -1172,7 +1172,7 @@ int ObBasicStatsEstimator::fill_hints(common::ObIAllocator &alloc,
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("get unexpected null", K(table_name));
|
||||
} else {
|
||||
const char *fmt_str = "NO_REWRITE USE_PLAN_CACHE(NONE) DBMS_STATS FULL(%.*s)";
|
||||
const char *fmt_str = "NO_REWRITE USE_PLAN_CACHE(NONE) DBMS_STATS FULL(%.*s) OPT_PARAM('ROWSETS_MAX_ROWS', 256)";
|
||||
int64_t buf_len = table_name.length() + strlen(fmt_str);
|
||||
char *buf = NULL;
|
||||
if (OB_ISNULL(buf = static_cast<char *>(alloc.alloc(buf_len)))) {
|
||||
|
||||
@ -317,7 +317,7 @@ int ObHybridHistEstimator::gen_query_sql(ObIAllocator &allocator,
|
||||
reset_select_items();
|
||||
sample_hint_ = simple_hint;
|
||||
int64_t duration_time = -1;
|
||||
ObString hint_str("NO_REWRITE USE_PLAN_CACHE(NONE) DBMS_STATS");
|
||||
ObString hint_str("NO_REWRITE USE_PLAN_CACHE(NONE) DBMS_STATS OPT_PARAM('ROWSETS_MAX_ROWS', 256)");
|
||||
//add select items
|
||||
if (OB_ISNULL(dst_opt_stat.table_stat_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
|
||||
@ -131,11 +131,12 @@ int ObCodeGenerator::detect_batch_size(
|
||||
0,
|
||||
exec_ctx->get_min_cluster_version());
|
||||
int64_t rowsets_max_rows = tenant_config->_rowsets_max_rows;
|
||||
OZ(opt_params->get_integer_opt_param(ObOptParamHint::ROWSETS_MAX_ROWS, rowsets_max_rows));
|
||||
OZ(expr_cg.detect_batch_size(flattened_exprs, batch_size,
|
||||
rowsets_max_rows,
|
||||
tenant_config->_rowsets_target_maxsize,
|
||||
scan_cardinality));
|
||||
// overwrite batch size if hint is specified
|
||||
OZ(opt_params->get_integer_opt_param(ObOptParamHint::ROWSETS_MAX_ROWS, batch_size));
|
||||
}
|
||||
// TODO qubin.qb: remove the tracelog when rowsets/batch_size is displayed
|
||||
// in plan
|
||||
|
||||
Reference in New Issue
Block a user