The Oracle query optimizer is an amazing piece of code, developed and improved over the years to generate execution plans that are both easy to generate and that run fast. The optimizer uses a number of “tricks” along the way to improve the speed of execution and implements the execution plan in a way that gives the same results as your unmodified SQL. These “tricks” (or heuristics) sometimes include query transformations.
Query transformations, as the name implies, change the SQL query from its original ...