Skip to Main Content

Write Great SQL Office Hours

Free tips and training every month! Subscribe for reminders and more from Office Hours. FAQ

Header container

January 21

14:00 UTC   Start Times Around the World

Description

Joins
In this episode of Ask TOM Office Hours, we looked at the three join methods:

* Hash joins
* Merge joins
* Nested loops

We covered how these work and their relative strengths and weaknesses

Highlights include:

02:35 - Example queries for unindexed joins
10:30 - How a hash join works
13:40 - How a merge join works
21:05 - How a nested loop works
28:35 - Example joins in top-N queries
45:15 - How indexes affect joins
49:00 - Example joins wheen filtering one table
52:10 - How adaptive plans work
53:30 - Summary; time complexity of the joins, how indexes affect them, and their optimal use case

Subscribe to give us feedback and be notified of upcoming sessions!

Having trouble watching the video on this page? Open the video in your browser.

Session Resources

Your Experts

Chris Saxon
Chris Saxon, Oracle Developer Advocate for SQL    
Chris Saxon is the quizmaster for the Database Design competitions and an Oracle Developer Advocate for SQL. His job is to help you get the best out of the Oracle Database and have fun with SQL! He's also part of the answer team on Ask TOM and creates YouTube videos at The Magic of SQL channel.
Keith Laker
Keith Laker, Senior Principal Product Manager    
I have been working with Oracle data warehouse technology for over 20 years working on a wide variety of data warehouse projects both as a consultant and an onsite support engineer. I am now part of the Data Warehouse Product Management Team where I am responsible for analytical SQL. I am based in the UK at our Manchester office. A key part of my role is to work with our sales teams to brief our customers on data warehousing and analytical SQL: explaining the wide variety of new and exciting opportunities that our DW and analytical solutions can support. I regularly deliver sales training for data warehousing and analytical SQL across all our sales regions and provide competitive intelligence support across all the major data warehouse vendors.