At one point or another during your career as a database performance expert, you will face a situation where the optimizer picks the wrong join method. As tempting as it is to brute-force the plan you want via an index hint, it’s always better to understand why the Optimizer made the decision and provide the necessary information to allow the Optimizer to select the plan you want by default.
In this short video, I explain how the Optimizer determines the join method based on the cardinality of the two tables used in the join. I also provide a simple set of steps to help you identify these types of problems and guidance on how to supply the necessary information, so the Optimizer will automatically selects the appropriate join method.
6 июн 2022