Cost-Based Oracle Fundamentals / Edition 1by Jonathan Lewis
Pub. Date: 10/31/2005
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 columnsand the optimizer flatly refuses to use
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 columnsand 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 Lewisone of the foremost authorities in this fielddescribes 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.
Table of ContentsA table of contents is not available for this title.
and post it to your social network
Most Helpful Customer Reviews
See all customer reviews >
Lewis has produced a book for a rather exclusive audience. Certainly, it's restricted to those of you who use Oracle's databases. But it is further constrained to people who want to seriously understand and optimise their Oracle computations. Why you want to do this can vary. You might simply be interested, intellectually, in probing into how Oracle implements your SQL operations. Since SQL is a declarative language, most implementations are somewhat of a black box as to how they optimise. Or, your database needs may be so large that you have to carefully tweak for faster runs. In reply, Lewis delves deeply into how to use the optimiser. Offering detailed looks under the bonnet. By explaining how to see the possible ways that the optimiser might rewrite your query, and what the implications of this are for runtime efficiency. Most other books on other databases never take you this deep. Ample opportunity here to heavily improve your table design and your SELECT queries against the tables. Though perhaps you should already be well versed in 9i or 10g to get the most benefit. The book is also an interesting glance at a way that Oracle is attempting to differentiate itself from competitors. Certainly, for the free databases of MySQL and PostgreSQL, I don't think they have anything remotely comparable to the sophistication of Oracle's optimiser. No doubt Oracle's pitch is that while their license fees are not cheap, you might ultimately derive the most productivity from their database and optimiser.