- A general rule is that joins are faster in most cases (99%).
- The more data tables have, the subqueries are slower.
- The less data tables have, the subqueries have equivalent speed as joins.
- The subqueries are simpler, easier to understand, and easier to read.
- Most of the web and app frameworks and their "ORM"s and "Active record"s generate queries with subqueries, because with subqueries are easier to split responsibility, maintain code, etc.
- For smaller web sites or apps subqueries are OK, but for larger web sites and apps you will often have to rewrite generated queries to join queries, especial if a query uses many subqueries in the query.
Some people say "some RDBMS can rewrite a subquery to a join or a join to a subquery when it thinks one is faster than the other.", but this statement applies to simple cases, surely not for complicated queries with subqueries which actually cause a problems in performance.