can we always convert a usual subquery/correlated subquery to join type query?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
yes and no…
Yes, in that JOIN/EXISTS/IN usually give the same plan and are often the same
No, in that if the EXISTS table has > 1 row for the main table you’ll need DISTINCT to avoid dupes
I’d stick with an EXISTS type query if this is relevant and you don’t need data from the EXISTS table