Re: In what circumstances might optimizer not choose the lowest cost?

  • From: Sayan Sergeevich Malakshinov <malakshinovss@xxxxxxxxx>
  • To: kibeha@xxxxxxxxx
  • Date: Tue, 20 Jan 2015 17:39:24 +0300

Kim,

> Are there known circumstances where the optimizer does NOT choose 
> the lowest cost, even though same query with a hint CAN produce a 
> plan with a lower cost?

In my humble opinion, that because desired plan branch was not analyzed by 
CBO because of transformation(optimizer choose another branch on previous 
steps), but when you hinted it, CBO chose right branch.
It's quite often reason, for example a couple days ago i had issue on 
11.2.0.3 with join_elimination: test case - 
https://gist.github.com/xtender/f0871ffa99b1413232e6

--
Best regards,
Sayan Malakshinov
http://orasql.org

Other related posts: