O'Reilly logo

Cost-Based Oracle Fundamentals by Jonathan Lewis

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 10Join Cardinality

What is the maximum number of tables that Oracle can join at once? You may be surprised to learn that the answer is two. It doesn't matter how many tables you have in your query, Oracle will only work on two objects at a time in a join. In fact, you could even argue that the optimizer doesn't have a long-term strategy for joins, it simply takes what it's got at any one point and joins on the next available table to see what happens.

Of course, this description is a little fanciful—but it's not far from the truth. To perform a five-table join, the optimizer picks a starting table and joins on one table; it takes the intermediate result and joins on one more table; it takes the intermediate result ... and so on, until ...

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