diff --git a/src/share/parameter/ob_parameter_seed.ipp b/src/share/parameter/ob_parameter_seed.ipp index d32b676f82..d904b57ba8 100644 --- a/src/share/parameter/ob_parameter_seed.ipp +++ b/src/share/parameter/ob_parameter_seed.ipp @@ -1666,8 +1666,8 @@ DEF_BOOL(_enable_in_range_optimization, OB_TENANT_PARAMETER, "True", DEF_BOOL(_force_explict_500_malloc, OB_CLUSTER_PARAMETER, "False", "Force 500 memory for explicit allocation", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); -DEF_CAP(range_optimizer_max_mem_size, OB_TENANT_PARAMETER, "128M", "[16M,1G]", - "to limit the memory consumption for the query range optimizer. Range: [16M,1G]", +DEF_CAP(range_optimizer_max_mem_size, OB_TENANT_PARAMETER, "128M", "[0M,)", + "to limit the memory consumption for the query range optimizer. Range: [0M,+∞), 0 stands for unlimited", ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); DEF_TIME(_schema_memory_recycle_interval, OB_CLUSTER_PARAMETER, "15m", "[0s,)", "the time interval between the schedules of schema memory recycle task. " diff --git a/src/sql/rewrite/ob_query_range.cpp b/src/sql/rewrite/ob_query_range.cpp index f6bead0220..d4ab630390 100644 --- a/src/sql/rewrite/ob_query_range.cpp +++ b/src/sql/rewrite/ob_query_range.cpp @@ -180,6 +180,9 @@ int ObQueryRange::init_query_range_ctx(ObIAllocator &allocator, query_range_ctx_->phy_rowid_for_table_loc_ = phy_rowid_for_table_loc; query_range_ctx_->ignore_calc_failure_ = ignore_calc_failure; query_range_ctx_->range_optimizer_max_mem_size_ = exec_ctx->get_my_session()->get_range_optimizer_max_mem_size(); + if (0 == query_range_ctx_->range_optimizer_max_mem_size_) { + query_range_ctx_->range_optimizer_max_mem_size_ = INT64_MAX; + } query_range_ctx_->use_in_optimization_ = use_in_optimization; } for (int64_t i = 0; OB_SUCC(ret) && i < range_columns.count(); ++i) {