Back to Browse

Are SQL Server Subqueries Bad??

136 views
Jan 20, 2018
6:44

For the past several years, I've noticed that I have generally avoided using subqueries, based on a suspicion that they are probably less efficient than a JOIN. I do still use them for one-time or ad-hoc queries where performance isn't a concern, but I have been avoiding them for any production queries that I release. But I haven't done any research to support my suspicion. This Saturday morning, while working on another SQL query optimization issue, I figured I would try a test to compare the performance of a simple subquery vs. a JOIN. What do you think? Do you think that subqueries are typically slower than JOINs? If so, how much slower?

Download

0 formats

No download links available.

Are SQL Server Subqueries Bad?? | NatokHD