Cost-Based Oracle Fundamentals

Cost-Based Oracle Fundamentals

4.11 - 1251 ratings - Source

The question, qWhy isna€™t Oracle using my index?q must be one of the most popular (or perhaps unpopular) questions ever asked on the Oracle help forums. Youa€™ve picked exactly the right columns, youa€™ve got them in the ideal order, youa€™ve computed statistics, youa€™ve checked for null columnsa€”and the optimizer flatly refuses to use your index unless you hint it. What could possibly be going wrong? If youa€™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. Youa€™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 Lewisa€”one of the foremost authorities in this fielda€”describes the most commonly used parts of the model, what the optimizer does with your statistics, and why things go wrong. With this information, youa€™ll be in a position to fix entire problem areas, not just single SQL statements, by adjusting the model or creating more truthful statistics.The no_merge hint has occasionally been described in the literature (possibly even in the Oracle manuals at one stage) as something that stops the optimizer from doing a merge join. This is not correct. The no_merge hint stops the optimizeranbsp;...

Title:Cost-Based Oracle Fundamentals
Author:Jonathan Lewis
Publisher:Apress - 2005-11-02


You Must CONTINUE and create a free account to access unlimited downloads & streaming