subqueries vs joins


I am moving from a platform which I was accessing Oracle tables to a platform that is accessing SQl Server tables.  I often use subqueries as opposed to inner joins for variables such as looking up a name on a member table, finding a provider on a provider table.

Is there any advantage, disadvantage to using subqueries as opposed to multiple joins?
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vitor MontalvãoMSSQL Senior EngineerCommented:
It depends. At least for a reading matter a JOIN is more easy to understand since you see the query and know immediately how the tables are related.
You can also use both solutions and then use the Query Plan of each query to see which one is better.
ste5anSenior DeveloperCommented:
JOINS are normally "cleaner" by the means of reading the SQL statement. Under most circumstances they perform the same like a sub-query.

JOINs or sub-queries for variables may suffer generally from cardinality estimation, when there are no according indices on the variable tables (member, provider). In this case a sub-query may perform better. But you need to test these cases and compare them.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.