I think you should do rule-based programming. Do not think about the situation, follow the list of unbreakable rules, regardless of the situation, no matter what you think is the best way, if the rules say FOR LOOP is used in case X, then you should use a loop, even if you know if only 1, cycle from 1 to 1.
We will make a reservation:
Each request has a better plan.
Each query optimizer will determine this plan x% of the time.
RBO had nowhere else to go, this percentage accuracy was lower than CBO, but it never improved. It was limited, like any rule-based system.
Mark brady
source share