I’m writing a series of articles about the cost-based optimizer for AllthingsOracle. My intention in this series is to present the optimizer with far less formality than I did in the book (Cost Based Oracle – Fundamentals), talking through ideas, problems and solutions and only presenting some arithmetic to explain why a problem appears or why a solution works.
So far I’ve published six installments:
- Part 1 – The optimizer’s “thought processes” when considering a two-table join
- Part 2 – Steps we can take to understand the data and its patterns when the optimizer chooses “the wrong plan”
- Part 3 – Comparing the simplest cases of hash joins to nested loop joins
- Part 4 – Query blocks and the big picture
- Part 5 – Why the optimizer picks bad plans and how to help it (1)
- Part 6 – Why the optimizer picks bad plans and how to help it (2)
RFC: the CBO is enormous. If there are areas that you would like me to write about in this series give me some idea in the comments below of what you’d like explained and I’ll try to write about it at some point in the series. Try to stick with concepts and principles, don’t give me a long description of a specific problem unless you think I can extract a general principle from it, and if you want to include execution plans etc. use the “sourcecode” “/sourcecode” tags (replace the quotes with square brackets) to get a fixed font output.
Update (March 2016)
The entire series to date (6 installments) has been translated into Chinese by James Su at this URL.