Previous installment: Why is it so hard to get SQL performance right the first time? First installment: DON’T PANIC
“I know a funny little man, As quiet as a mouse, Who does the mischief that is done In everybody’s house! There’s no one ever sees his face, And yet we all agree That every plate we break was cracked By Mr. Nobody. The finger marks upon the door By none of us are made; We never leave the blinds unclosed, To let the curtains fade. The ink we never spill; the boots That lying round you see Are not our boots,—they all belong To Mr. Nobody.”
If the inputs to the CBO change, the plan can change. For example, changes to bind variables can cause the plan to change when it is hard parsed. Therefore one should never be surprised when plans change. Here are ten possibilities.
What would be surprising if the plan changed if none of the CBO inputs changed. Richard Foote demonstrates how that can happen at https://richardfoote.wordpress.com/2010/02/16/how-does-an-execution-plan-suddenly-change-when-the-statistics-remain-the-same-in-limbo/.
Copyright © 2015 Iggy Fernandez