By Jonathan Lewis
The insights that Jonathan presents into the workings of the cost-based optimizer will make a DBA a greater clothier, and a Developer a greater SQL coder. either teams becomes greater troubleshooters - Thomas Kyte, vice chairman (Public Sector), Oracle company The query, "Why isn't really Oracle utilizing my index?" needs to be the most renowned (or maybe unpopular) questions ever requested at the Oracle support boards. you've got picked precisely the correct columns, you have got them within the excellent order, you've gotten computed records, you have checked for null columns&emdash;and the optimizer flatly refuses to take advantage of your index except you trace it. What may very well be going improper? If you may have suffered the disappointment of gazing the optimizer do anything thoroughly weird and wonderful whilst the easiest execution plan is completely visible, or spent hours or days attempting to make the optimizer do what you will want it to do, then this can be the booklet you would like. you are going to come to understand how the optimizer "thinks," comprehend why it makes errors, and realize the information styles that make it move awry. With this knowledge at your fingertips, you are going to store an incredible period of time on designing and trouble-shooting your SQL. The cost-based optimizer is just a bit of code that features a version of ways Oracle databases paintings. through employing this version to the statistics approximately your facts, the optimizer attempts to successfully convert your question into an executable plan. regrettably, the version cannot be ideal, your records cannot be ideal, and the ensuing execution plan will be faraway from excellent. In Cost-Based Oracle basics, the 1st publication in a sequence of 3, Jonathan Lewis&emdash;one of the key professionals during this field&emdash;describes the main primary components of the version, what the optimizer does along with your information, and why issues get it wrong. With this data, you may be capable of repair whole areas of difficulty, not only unmarried SQL statements, by way of adjusting the version or developing extra honest data.