» » Cost-Based Oracle Fundamentals (Expert's Voice in Oracle)

eBook Cost-Based Oracle Fundamentals (Expert's Voice in Oracle) download

by Jonathan Lewis

eBook Cost-Based Oracle Fundamentals (Expert's Voice in Oracle) download ISBN: 1590596366
Author: Jonathan Lewis
Publisher: Apress (January 24, 2007)
Language: English
Pages: 536
ePub: 1611 kb
Fb2: 1265 kb
Rating: 4.3
Other formats: txt lit azw rtf
Category: Technologies
Subcategory: Programming

In Cost-Based Oracle Fundamentals, the first book in a series of three, Jonathan Lewis&emdash;one of the foremost authorities in this field&emdash;describes the most commonly used parts of the model, what the optimizer does with your statistics, and why things go wrong.

In Cost-Based Oracle Fundamentals, the first book in a series of three, Jonathan Lewis&emdash;one of the foremost authorities in this field&emdash;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.

Jonathan Lewis (Author). Special offers and product promotions.

Cost-Based Oracle Fundamentals 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.

Cost-Based Oracle Fundamentals. Expert's Voice in Oracle. file?p file 3067171813508366601. Book will be strongly co-promoted with Tom Kyte's Expert Oracle Database Architecture (1-59059-530-0). Authors: Lewis, Jonathan. 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. Show all. About the authors.

This repository accompanies Cost-Based Oracle Fundamentals by Jonathan Lewis (Apress, 2006). Download the files as a zip using the green button, or clone the repository to your machine using Git. Releases. Release v. corresponds to the code in the published book, without corrections or updates. See the file Contributing. md for more information on how you can contribute to this repository.

Jonathan has written two books about Oracle (Practical Oracle8i, Addison-Wesley, 2000; Cost-Based Oracle Fundamentals, Apress, 2005), and has contributed to two others (Oracle Insights, Apress, 2004; Oracle Database 10g New Features, Oracle Press, 2004). He also writes regularly for the UKOUG magazine, and occasionally for other publications around the world. In the limited amount of time he has leftover, Jonathan also publishes high-tech Oracle articles on his blog at jonathanlewis. Country of Publication.

Oracle Database Administrator at GfK Chart-Track Ltd. oracle pl sql. DBA, ETL, Data-warehouse reporting, migration (Windows to Linux and version 7 to 8i to 9i to 10g). Company data powered by. Jack Douglas.

Jonathan Lewis is one of the world's foremost authorities in this field (he is frequently quoted and reference by other leading experts, such as Tom Kyte – see for example

Book will be strongly co-promoted with Tom Kyte's Expert Oracle Database Architecture (1-59059-530-0)

Highlights traps for those migrating from Oracle 8i to 9i to 10g, potentially averting often disastrous performance issues and downtime (=lost revenue)

The first comprehensive book written to investigate, describe, and demonstrate the methods used by the Cost Based Optimizer

Jonathan is one of very few Oracle authors to maintain online enhancements, errata and addenda pages, so the reader will be supported long after the book is published

Comments: (7)
This is the book for the Oracle database tuning personnel.

Lewis is a well-known and respected expert on Oracle database tuning.

In this book, Lewis takes the novice on a journey of discovery through the workings of the cost-based optimiser (CBO) for the Oracle database engine. (There was a rule-based optimiser (RBO) many years ago, but this has been relegated to the dust-bin of history.)

Although the Oracle database has been evolving in the methods for running queries, and adding auto-tuning features, the knowledge contained in this book is vital for any Oracle database tuner.
Each quarter my team of DBA's has one book that we read and discuss in team meetings. This quarter, Cost-Based Oracle Fundamentals is it. This book is a wholly remarkable book for the moderate to advanced DBA. It is a deep dive into the Oracle optimizer, providing some wonderful insights into not only how it works, but why. It is not a book for the faint of hart, or those waiting breathlessly for retirement. It is a book for those who want to understand the CBO in more depth.

Within the book, Jonathan provides insights into how the CBO *should* work. He follows up often by demonstrating the maturing (or devolving as the case may be) of the CBO from version to version. Beyond his own experimentation and results, he leads the reader into the process that he has followed to come to understand the internals of the CBO, providing a road map allowing the reader to continue to explore the optimizer in future releases.

However, I must take Jonathan to task, for he is a nasty tease. This book was released about two years ago. In it, he leads us on with promises of forthcoming volumes 2 and 3, dangling the carrot out there for us to follow. Sadly, these volumes are yet to be seen. Jonathan! Quit running to and fro filling our heads with knowledge at various conferences and write those books man!

A caution for the new DBA or the cursory SQL developer, you may find this book overwhelming at first glance. For the new or even intermediate DBA, it might be hard to derive practical application of what Jonathan is teaching at first glance. Take your time with the material and the insight that you will gain will be invaluable.

Overall, if you want a book with meat, then this is the book for you. It will expand your mind and the way you look at the Oracle CBO.
I waited nearly three years after the first cover to cover read through of this book, and two years after the second cover to cover read through of this book to write this review - just in case my opinion of the book changed. I enjoyed the first pass through the book, but became increasingly concerned as just weeks earlier I had migrated the most critical database at the company from Oracle to It seemed every turn of the page brought new understanding of what could have gone wrong during and after the migration, not only what might happen, but also most importantly WHY it might happen. Appendix A of the book quickly summarizes what one might expect when moving from one database release to another - that section of the book, for me, was worth several times the price of the book. I might also add that this book provided the tools and techniques necessary to troubleshoot and resolve a session crashing issue triggered by the application of the October 2006 patch for, as well as another odd problem which appeared when OPTIMIZER_FEATURES_ENABLE was set to a value greater than

During the second read through of the book I found a number of extremely useful pieces of information which were somehow missed during the previous pass through the book (I recorded much more detailed notes the second time). A brief sampling of some of the more personally useful pieces of information from the book:
* The filter lines in 10053 traces and XPLANS can show implicit conversions from varchar to number. (It also shows when a commercially developed program repeatedly defines bind variables as VARCHAR2 when those bind variables should have been defined as numeric.)
* Bind variable peeking is not used with explain plan or autotrace. (Believing explain plans for SQL statements with bind variables seems to be a common problem on Oracle related forums.)
* In an execution plan, the access predicates show the predicates used to generate the start and stop keys for the index, but the filter predicates show the predicates that cannot be used until the leaf blocks have been reached. (That's why my query is running slow..., slapping hand to forehead.)
* OPTIMIZER_INDEX_COST_ADJ reduces the cost of single block reads, which tends to reduce the tendency of excessive tablescans. The downside is that due to rounding errors, the optimizer may decide to use the wrong index. (I have seen this happen, Oracle decides to use an index with just two distinct values, rather than a high precision index with many distinct values - the primary key index.)
* Constraints on tables can generate additional predicates due to transitive closure. (That's were those access and filter predicates came from...)
* Bind variable peeking can introduce poor execution plans if a typical value is not specified for bind variables on the first hard parse. (Such as a commercial product submitting NULL values for the bind variables values during the initial hard parse, followed by extremely unpopular values, followed by somewhat popular values in a tight loop, causing performance problems.)
* With the evolution of the optimizer, Oracle is increasingly likely to eliminate subqueries by using various transformations. (Hence the reason why code that ran slowly against an Oracle database might run quickly against a database, and why other code that ran quickly on Oracle takes orders of magnitude longer on, without some assistance.)
* Setting the value of SORT_AREA_RETAINED_SIZE to a value other than that of SORT_AREA_SIZE (or 0) may cause Oracle to spill the sort results to the temp tablespace, even if the sort completed in memory, and this will not be reported as a sort to disk. (This flies somewhat counter to a recommendation of my favorite Oracle wait event book from 2001 which suggested that as SORT_AREA_SIZE is increased to allow sorts to complete in memory, that SORT_AREA_RETAINED_SIZE should be decreased.)
* Extended coverage of 10053 trace file capturing and analysis.
* Description of several hints which might be used to better control the execution plans.
* Extensive descriptions of several of the hidden (underscored) parameters which control the optimizer's behavior and how the value for OPTIMIZER_FEATURES_ENABLE automatically adjusts some of these hidden parameters.
* Mathematical logic behind the cost calculations used by the optimizer, and how the calculated cost influences the execution plans generated by the optimizer.

The author maintains an extremely helpful Oracle blog which seems to be a direct extension of his book, helping to extend the analysis performed in the book to more recent versions of Oracle, and explore other areas of potential concern to database administrators. On his website the author also maintains a complete list of book errata, additional information learned since the publication date, and how the book's contents need to be reworded to be applicable to more recent versions of Oracle - in all cases giving credit to the person who identified the potential rewording. Directly from the author's errata pages: "I spotted the first error in Practical Oracle 8i a few seconds after the first copy had landed on my front door-step. I spotted the first error in Cost Based Oracle before the printer had even finished printing it - I woke up at three a.m. a few days before the book came out, realizing that I had introduced an error in the last pass of proof-reading the galley pages." As infrequently as this author makes mistakes, it is good to see that the author is humble about the mistakes, without attempting to sweep those mistakes into a dark corner while scolding the person who identified the mistakes.

You will not find page after page of wide margin, 14 point font sized text interspersed between cartoon drawings in the book. You will not find wild assumptions in this book. You will not find cases where the author must have been hand waiving (with a third hand) while composing the book. You will not find untested scripts scattered through the pages. You will find, with a little bit of effort, the reason why the Oracle database instance did not behave as expected.

Prior to purchasing this author's book, I performed a fairly extensive search on the Internet to make certain that the author's book would not do more damage than good to my comprehension of what makes an Oracle database function. I found that the author created Usenet group postings in Oracle related forums, helping other users, dating back to 1994; and in checking the accuracy of those post contents, what was stated is just about as accurate now as it was in 1994. I also found that the author had participated in several technical discussions on the Oracle-L list serve. Following the purchase of the book I noticed that the author set up one of the most technical Oracle related blogs on the Internet, and started participating in Oracle's OTN forums. Since that time I have had the opportunity to converse directly with the author a couple times on the OTN forums and Usenet, where I have always found him to be helpful, knowledgeable, and humble if he missed/overlooked a small detail (and humble when pointing out a small or significant detail which I missed).

In short, my opinion of the book has not changed since the first read through nearly three years ago. "Cost-Based Oracle Fundamentals" was, and still is, the most useful Oracle performance related book which I have found. The book, however, is closely followed in usefulness, in no particular order, by "Troubleshooting Oracle Performance", "Optimizing Oracle Performance", "Expert Oracle Database Architecture" and "Oracle Performance Tuning 101".