Just like the MEMO structure in SQL Server which is kind of a "paper trail" of steps the optimizer takes in optimizing the query, is there anything in Oracle through which I can see what are the alternative plans the optimizer has ever considered (and pruned because they are more expensive than the plan that the optimizer chooses to execute)?
Ny way to trace the optimizer’s work in Oracle
optimizationoracle
Related Question
- Oracle 10g: same query, different plans on copies of the same DB
- Db2 – ny way to trace optimizer’s work in DB2
- Sql-server – How to teach the optimizer to use index instead of fts with join on data logging master/detail tables
- Sql-server – way to see what were the Candidate Execution Plans generated by the Query Optimizer
- Sql-server – Dethestification of SQL Server optimization process
Best Answer
Yes! This is called a 10053 trace in Oracle parlance. It's more formally known as "Tracing of Optimizer Computations".
Check out MOS doc 225598.1, or Jonathon Lewis' blog post here: https://jonathanlewis.wordpress.com/2014/05/23/10053-trace/
There's loads of hits for "10053 trace" so if you can't find what you need, it's probably out there in search-land.