The Legacy Obituaries

Stored outlines

pre-11.2 · performance

Survived, partially.

✓ certified by the mortician

In life

A stored outline is a saved set of optimizer hints bound to a SQL text so that the optimizer reproduces the same execution plan every time. Outlines live in the OUTLN schema, are created with CREATE OUTLINE or captured automatically, and are activated through the USE_STORED_OUTLINES setting.

Migrations care because outlines are a form of plan pinning. Their presence tells you which statements were fragile enough to need it, and any plan stability the application depends on has to be re-created with the target's own mechanisms, such as Query Store plan forcing on Azure SQL or hint-based approaches on PostgreSQL.

The 12.1 Upgrade Guide lists stored outlines as deprecated with plan baselines as the replacement, and the 26ai guide says they were deprecated in Oracle Database 11g and that 26ai is the terminal release, instructing users to migrate to SQL plan baselines. The pages used do not state which 11g release began the deprecation, and no desupport release has been named, so neither field is set here.

Cause of departure

Not deprecated by Oracle. Listed here because Azure offers no clean equivalent. Oracle names SQL plan baselines as the successor.

Obituary

Stored outlines, born before 11.2, pinned an execution plan to a SQL text. In Oracle, they were succeeded by SQL plan baselines.

They did not make the Azure crossing because PostgreSQL offers no plan store or plan-forcing feature, while Azure SQL Query Store can force only captured plans it still retains. Outlines cannot be imported, so each desired plan must be captured and re-established—a modestly bureaucratic afterlife.

It is survived by Azure Database for PostgreSQL Flexible Server, only by workaround through pg_hint_plan. It is also survived partly by Azure SQL Database, where Query Store can force retained plans or attach hints without changing application code.

Survived by

Azure SQL Database partial effort M

Applies to Oracle 11.2, 12.1, 12.2, 18c, 19c, 21c, 23ai

Stored outlines pinned an execution plan for a SQL text. Query Store, enabled by default on Azure SQL Database and Managed Instance, keeps the history of plans per query and lets you force a retained plan with sp_query_store_force_plan or attach Query Store hints without changing application code, and automatic plan correction can force the last good plan itself. Outlines cannot be imported; each must be re-established by capturing the desired plan in Query Store.

  • Export the outline list and the SQL text of each outlined statement.
  • After migration, run the workload so Query Store captures candidate plans.
  • Force the plan matching the intended shape with sp_query_store_force_plan, or apply Query Store hints.
  • Enable automatic plan correction to handle future regressions.

Complications

major Query Store can force only plans that it captured and still retains, collects plans for DML statements (not DDL) and not for natively compiled procedures by default, is enabled by default on new Azure SQL Database and Managed Instance databases, and cannot be enabled on master or tempdb.

Azure Database for PostgreSQL Flexible Server workaround effort M

Applies to Oracle 11.2, 12.1, 12.2, 18c, 19c, 21c, 23ai

PostgreSQL has no plan store or plan-forcing feature. On Flexible Server the pg_hint_plan extension lets you steer the planner with hint comments (scan and join methods, join order) embedded in the SQL text, which approximates an outline's effect but requires editing the statement or using the extension's hint table, and hints are not versioned or automatically validated.

  • Allowlist pg_hint_plan and add it to shared_preload_libraries.
  • Reproduce the intended plan with hint comments on statements that regress.
  • Prefer statistics, indexes and planner settings over hints where possible.

Complications

minor pg_hint_plan on Flexible Server must be allowlisted, loaded through shared_preload_libraries and created in each database, and steers the planner through hint phrases inside a comment beginning with /*+ in the SQL text.

Notices of correction

  1. oracle Oracle Database Changes, Desupports, and Deprecations (Upgrade Guide 26ai) · Upgrade Guide 26ai, G43570-12, updated Jul 2026 · read 2026-09-26
  2. oracle Deprecated and Desupported Features for Oracle Database 12c (12.1) · Upgrade Guide 12.1, E41397 · read 2026-09-26
  3. microsoft Monitor performance by using the Query Store · page updated 2026-08-27 · read 2026-09-26
  4. microsoft Considerations when using extensions in Azure Database for PostgreSQL flexible server · page updated 2026-08-12 · read 2026-09-26
  5. microsoft Extensions and modules by name in Azure Database for PostgreSQL flexible server · page updated 2026-07-13 · read 2026-09-26

← All notices

Stored outlines — Legacy Obituaries