What is Plan Instability?

Oracle’s optimizer generates a plan each time a query is parsed. If the inputs to the optimizer change—even slightly—it might produce a different plan. Most of the time, that’s fine. But sometimes:

  • The new plan is much slower.
  • The old plan would still be better.
  • You didn’t change anything, but the plan changed anyway.