DEV Community

Discussion on: Improving SQL Query by Adding conditions in Joins

Collapse
 
sqlknowitall profile image
Jared Karney

That's not luck, it would absolutely produce a new plan because the text changed. Even adding a space or making a letter upper case will generate a new plan.

Collapse
 
buinauskas profile image
Evaldas Buinauskas • Edited

Yes, this is correct.

I should've been more clear that moving clause from where to join does not add any performance on its own, new forcefully generated plan did. Thanks for bringing this up!