fix auto gather stats memory bloat

This commit is contained in:
wangt1xiuyi
2023-03-02 15:54:43 +00:00
committed by ob-robot
parent 2ebaaf7b7c
commit 91ca72111d
21 changed files with 393 additions and 251 deletions

View File

@ -42,6 +42,7 @@ int ObAnalyzeExecutor::execute(ObExecContext &ctx, ObAnalyzeStmt &stmt)
{
int ret = OB_SUCCESS;
ObTableStatParam param;
param.allocator_ = &ctx.get_allocator();
share::schema::ObSchemaGetterGuard *schema_guard = ctx.get_virtual_table_ctx().schema_guard_;
ObSQLSessionInfo *session = ctx.get_my_session();
bool in_restore = false;

View File

@ -658,6 +658,7 @@ int ObOptimizerStatsGatheringOp::generate_stat_param(ObTableStatParam &param)
param.table_id_ = MY_SPEC.table_id_;
param.need_global_ = true;
param.part_level_ = MY_SPEC.part_level_;
param.allocator_ = &ctx_.get_allocator();
if (!MY_SPEC.is_part_table()) {
param.global_part_id_ = MY_SPEC.table_id_;
param.global_tablet_id_ = MY_SPEC.table_id_;