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

December 17

14:00 UTC   Start Times Around the World


How to Read an Explain Plan
To tune SQL, you need to know how it executed.

To find that out, you need to see the execution plan.

But how to do you make sense of a plan once you've got it?

In this session Chris shows you how to read an execution plan. It walks through the order of operations. Then discusses how to evaluate whether a plan is "good". It finishes with live demonstrations of "bad" plans and actions you can take to fix them.

Highlights include:

04:00 - Understanding the relationship between operations in a plan
07:15 - How to determine the order of operations in a plan, followed by walking through example plans
25:00 - Questions you need to ask to evaluate the quality of a plan
30:30 - How to capture runtime stats for a plan using DBMS_XPlan & what they mean
38:40 - How to get an execution plan using autotrace in SQL Developer
39:00 - Problem plan 1: bad row estimates
45:30 - Problem plan 2: missing indexes
49:30 - Problem plan 3: scalar subqueries
57:00 - Where to go from here

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

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

Your Experts

Chris Saxon
Chris Saxon, Oracle Developer Advocate for SQL    
Chris Saxon is an Oracle Developer Advocate and quizmaster on Dev Gym. 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.