Jump to ratings and reviews
Rate this book

Cost-Based Oracle Fundamentals

Rate this book
The insights that Jonathan provides into the workings of the cost-based optimizer will make a DBA a better designer, and a Developer a better SQL coder. Both groups will become better troubleshooters.

— Thomas Kyte, VP (Public Sector), Oracle Corporation

The question, "Why isn't Oracle using my index?" must be one of the most popular (or perhaps unpopular) questions ever asked on the Oracle help forums. You've picked exactly the right columns, you've got them in the ideal order, you've computed statistics, you've checked for null columns--and the optimizer flatly refuses to use your index unless you hint it. What could possibly be going wrong?

If you've suffered the frustration of watching the optimizer do something completely bizarre when the best execution plan is totally obvious, or spent hours or days trying to make the optimizer do what you want it to do, then this is the book you need. You'll come to know how the optimizer "thinks," understand why it makes mistakes, and recognize the data patterns that make it go awry. With this information at your fingertips, you will save an enormous amount of time on designing and trouble-shooting your SQL.

The cost-based optimizer is simply a piece of code that contains a model of how Oracle databases work. By applying this model to the statistics about your data, the optimizer tries to efficiently convert your query into an executable plan. Unfortunately, the model can't be perfect, your statistics can't be perfect, and the resulting execution plan may be far from perfect.

In Cost-Based Oracle Fundamentals, the first book in a series of three, Jonathan Lewis--one of the foremost authorities in this field--describes the most commonly used parts of the model, what the optimizer does with your statistics, and why things go wrong. With this information, you'll be in a position to fix entire problem areas, not just single SQL statements, by adjusting the model or creating more truthful statistics.

560 pages, Paperback

First published November 1, 2005

6 people are currently reading
59 people want to read

About the author

Jonathan Lewis

80 books5 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
35 (68%)
4 stars
10 (19%)
3 stars
4 (7%)
2 stars
1 (1%)
1 star
1 (1%)
Displaying 1 - 5 of 5 reviews
Profile Image for Michael Finocchiaro.
Author 3 books6,221 followers
January 26, 2017
Hands-down, the BEST book about how Oracle's complex optimiser works. The title says "volume 1" and I met Lewis at Oracle OpenWorld a few years back and he confirmed my suspicions that writing this book was so hard, he was too exhausted to write a sequel. It is difficult but an excellent source of information. When you realize that Oracle has as many patents and programmers for their optimiser as Microsoft has for their Windows operating system, you get an idea of the titanic work it required to write this extraordinary book!
Profile Image for Colin Hoad.
241 reviews2 followers
January 27, 2010
Nobody (including those who programmed it themselves) understands the Oracle CBO better than Jonathan Lewis. If you want to make sense out of how and why Oracle chooses to execute queries in the way that it does, read this book. It is dense, complicated material but Lewis nevertheless does his utmost to make it both clear and comprehensive.
Profile Image for Daniel Galassi.
47 reviews3 followers
March 16, 2015
After asking myself why some of the data models were performing so badly I realised I had to read this book (sure, among others). But this was the first book about cost-based optimisation I was able to read from cover to cover... and understand how to use the myriad of features Oracle databases have to offer.
The authors know CBO extremely well and the book is written in a way that a good developer (doesn't need to be a seasoned or expert) will take huge advantage of.
Profile Image for Neil.
150 reviews6 followers
May 11, 2021
Currently reading for work. I wish there was a good place to get reviews of technical manuals hopefully my review will help.
32 reviews
April 11, 2016
I read it a lot of time ago. Really a must! Optimizer internals in great detail.
Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.