Optimizer Directives
A then B
Seq A, Seq B Cost:100
Seq A, Idx B Cost:50
Idx A, Idx B Cost:20
etc.
B then A
Seq B, Seq A Cost:100
Seq B, Idx A Cost:50
Idx B, Idx A Cost:10
etc.
Select --ORDERED
* from A, B
where A.join_col = B.join_col
With the directive, ORDERED, the optimizer only considers paths that read from A then B.
The lowest cost is then chosen from those paths.
Normally, this path
would be chosen
With the directive,
this path would be chosen
Previous slide
Next slide
Back to first slide
View graphic version