Oracle_optimizer changes plan when CPU is highly loaded
We are using Oracle 12.1.0.1/12.1.0.2 SE2 and in some circumstances Oracle is suddenly changing the execution plan.
What we do:
There are permanently telegrams arriving from automated systems. Processing of one of this telegrams will take around 3-5 seconds. That's ok, a lot of work has to be done.
When CPU is highly loaded (all 6 cores are used as a lot of other applications are running on the same physical box), the optimizer obviously tries to substitute CPU with I/O and changes the execution plan. This results in an execution time of > 2000 seconds for the next telegram. The telegram after that long-lasting one could be processed normally, depending of current CPU load.