diff --git a/src/sql/optimizer/ob_explain_log_plan.cpp b/src/sql/optimizer/ob_explain_log_plan.cpp index 729e9a6d0c..b1df728d1b 100644 --- a/src/sql/optimizer/ob_explain_log_plan.cpp +++ b/src/sql/optimizer/ob_explain_log_plan.cpp @@ -131,8 +131,8 @@ int ObExplainLogPlan::check_explain_generate_plan_with_outline(ObLogPlan *real_p || OB_ISNULL(sql_ctx = exec_ctx->get_sql_ctx())) { ret = OB_ERR_UNEXPECTED; LOG_WARN("get unexpected null", K(ret), K(real_plan), K(explain_stmt), K(session_info), K(exec_ctx), K(sql_ctx)); - } else if (session_info->is_inner()) { - /* do not check explain for inner sql (include query in PL) */ + } else if (session_info->is_inner() || sql_ctx->is_prepare_protocol_) { + /* do not check explain for inner sql (include query in PL) and prepare stmt */ } else if (sql_ctx->multi_stmt_item_.is_part_of_multi_stmt() && sql_ctx->multi_stmt_item_.get_seq_num() > 0) { /* generate plan call by ObMPQuery::process_with_tmp_context use tmp context, do not check */ diff --git a/src/sql/optimizer/ob_select_log_plan.cpp b/src/sql/optimizer/ob_select_log_plan.cpp index da3a9748e1..1f7cced460 100644 --- a/src/sql/optimizer/ob_select_log_plan.cpp +++ b/src/sql/optimizer/ob_select_log_plan.cpp @@ -7312,6 +7312,11 @@ int ObSelectLogPlan::generate_late_materialization_table_get(ObLogTableScan *ind est_cost_info->logical_query_range_row_count_ = 1.0; est_cost_info->use_column_store_ = false; table_scan->set_est_cost_info(est_cost_info); + // set parallel info + table_scan->set_parallel(index_scan->get_parallel()); + table_scan->set_op_parallel_rule(OpParallelRule::OP_INHERIT_DOP); + table_scan->set_available_parallel(index_scan->get_available_parallel()), + table_scan->set_server_cnt(index_scan->get_server_cnt()); table_get = table_scan; } return ret; @@ -7420,6 +7425,10 @@ int ObSelectLogPlan::allocate_late_materialization_join_as_top(ObLogicalOperator join->set_strong_sharding(left_child->get_sharding()); join->set_interesting_order_info(left_child->get_interesting_order_info()); join->set_fd_item_set(&left_child->get_fd_item_set()); + // set parallel info + join->set_parallel(left_child->get_parallel()); + join->set_available_parallel(left_child->get_available_parallel()), + join->set_server_cnt(left_child->get_server_cnt()); join_op = join; } }