O'Reilly logo

Oracle by Guy Harrison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Joins and Subqueries

In this chapter, we discuss ways to improve performance when two or more tables are joined. Most nontrivial SQL statements contain joins, and ensuring that the tables involved are joined in the most effective manner is an important factor when tuning SQL.

The Oracle optimizer will do its best to ensure that the types of joins and the order in which tables are joined is optimal. Sometimes, the optimizer will be unable to determine the best join plan because of limitations in its algorithms and its understanding of your data. It is then up to you to enforce the optimal join approach through hints or other means.

Subqueries are close relatives to joins. Subqueries allow a SQL query to be embedded in another SQL ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required