Background
The core functionality of SQL Plan Management (SPM / SQL Plan Baseline) has been removed from seekdb: the DBMS_SPM package and Baseline lifecycle implementation have been deleted, Plan Baseline/SPM internal tables are marked as abandoned, and the Plan Cache loading Baseline implementation has been commented out. However, residual code remains, including system variables, empty manager pointers, DBMS_XPLAN display entry points, error codes/enums, comments, and orphaned result files.
Branch
master
Current State Quantification
- Approximately 40 source files contain SPM/SQL Plan Baseline related names or fields.
- System variables
optimizer_use_sql_plan_baselines and optimizer_capture_sql_plan_baselines can still be set, but have no actual business logic reading them.
ObPlanBaselineMgr only contains forward declarations and nullptr members; no implementation or initialization found.
- Two SPM mysqltests only have
.result files remaining; their corresponding .test files have been deleted.
Scope of Work
- Delete
optimizer_use_sql_plan_baselines, optimizer_capture_sql_plan_baselines, and the generated system variable and Session Cache code.
- Delete forward declarations of
ObPlanBaselineMgr and residual empty pointers in Tenant Module/Module Provider/Observer.
- Delete placeholder definitions for abandoned Plan Baseline/SPM internal tables, related schema declarations, and invalid display fields.
- Delete the fully commented-out Baseline loading code in Plan Cache, along with unused enums like
WAY_PLAN_BASELINE and PLAN_BASELINE_HANDLE.
- Delete the
DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE interface, package declaration/body, and its access to the abandoned Baseline virtual tables.
- Delete orphaned files
spm_expr.result, spm_new_plan_not_ok.result, and other pure SPM comment/test residues.
- Handle
OB_SQL_RETRY_SPM: This error code is currently still used for EXPLAIN/Outline plan replay retries. It needs to be renamed with a new name reflecting Outline semantics while preserving the original retry behavior. The call chain cannot be directly deleted.
Boundaries
- Outline functionality must be preserved. CREATE/ALTER/DROP OUTLINE, Outline Schema/DDL, Plan Cache Outline status, optimizer Hint application, concurrency throttling, and related tests are not within the deletion scope of this task.
- Evolution/sampling logic reused in adaptive Plan Cache/Plan Expiration will be evaluated based on actual functionality; only invalid SPM semantics and dead code will be cleaned.
Acceptance Criteria
- The master branch compiles successfully, and Outline and Plan Cache related regression tests pass.
- The following searches yield no valid SPM residues:
ObPlanBaseline, DBMS_SPM, SQL_PLAN_BASELINE, PLAN_BASELINE_HANDLE, WAY_PLAN_BASELINE, optimizer_use_sql_plan_baselines, optimizer_capture_sql_plan_baselines, OB_SQL_RETRY_SPM, __all_*plan_baseline, spm_*.
- Outline SQL creation, modification, deletion, and query plan application chains remain functional.
- DBMS_XPLAN no longer exposes SQL Plan Baseline display entry points that lack backend support.
Background
The core functionality of SQL Plan Management (SPM / SQL Plan Baseline) has been removed from seekdb: the DBMS_SPM package and Baseline lifecycle implementation have been deleted, Plan Baseline/SPM internal tables are marked as abandoned, and the Plan Cache loading Baseline implementation has been commented out. However, residual code remains, including system variables, empty manager pointers, DBMS_XPLAN display entry points, error codes/enums, comments, and orphaned result files.
Branch
master
Current State Quantification
optimizer_use_sql_plan_baselinesandoptimizer_capture_sql_plan_baselinescan still be set, but have no actual business logic reading them.ObPlanBaselineMgronly contains forward declarations and nullptr members; no implementation or initialization found..resultfiles remaining; their corresponding.testfiles have been deleted.Scope of Work
optimizer_use_sql_plan_baselines,optimizer_capture_sql_plan_baselines, and the generated system variable and Session Cache code.ObPlanBaselineMgrand residual empty pointers in Tenant Module/Module Provider/Observer.WAY_PLAN_BASELINEandPLAN_BASELINE_HANDLE.DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINEinterface, package declaration/body, and its access to the abandoned Baseline virtual tables.spm_expr.result,spm_new_plan_not_ok.result, and other pure SPM comment/test residues.OB_SQL_RETRY_SPM: This error code is currently still used for EXPLAIN/Outline plan replay retries. It needs to be renamed with a new name reflecting Outline semantics while preserving the original retry behavior. The call chain cannot be directly deleted.Boundaries
Acceptance Criteria
ObPlanBaseline,DBMS_SPM,SQL_PLAN_BASELINE,PLAN_BASELINE_HANDLE,WAY_PLAN_BASELINE,optimizer_use_sql_plan_baselines,optimizer_capture_sql_plan_baselines,OB_SQL_RETRY_SPM,__all_*plan_baseline,spm_*.