home / software / tips and tricks / Sql Join or Sub query has better Performance?

Sql Join or Sub query has better Performance?

Updated:  09/26/2013 13:09 PM
Author:  Shiju Mathews

Status:    Resolved.


Some old school developers like me thought "subquery" is always better, because the sub-query will be executed after the "WHERE" filter is applied. Also “subqueriess” is much more readable.

Due to the following facts Sql "Join" are much better for performance.
In JOINs RDBMS can create an execution plan and can predict what data should be loaded to be processed.
subquery makes for busy disk access
when the data is less than 20K and more than table is involved Join is better.
Tags: Sql Join or Sub query has better Performance?
Updated on: December 2024