- Series: Expert's Voice in Oracle
- Paperback: 536 pages
- Publisher: Apress (January 24, 2007)
- Language: English
- ISBN-10: 1590596366
- ISBN-13: 978-1590596364
- Product Dimensions: 7.5 x 1.2 x 9.2 inches
- Shipping Weight: 2.5 pounds (View shipping rates and policies)
- Average Customer Review: 39 customer reviews
- Amazon Best Sellers Rank: #1,319,938 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Other Sellers on Amazon
+ $3.99 shipping
+ $3.99 shipping
+ Free Shipping
Cost-Based Oracle Fundamentals (Expert's Voice in Oracle) Paperback – January 24, 2007
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
About the Author
Jonathan Lewis has been working in the information technology industry for nearly 25 years, and has been using the Oracle relational database management system for more than 20. For the past 16 years, he has worked as a freelance consultant, often spending only one or two days at a time with any client to address critical performance problems. He also advises on design and implementation problems, and on how to make best use of the most appropriate Oracle features for a given project. Jonathan is also renowned throughout the world for his tutorials and seminars about the Oracle database engine and how to make best use of it. Having visited 42 countries at last count, his exceptional ability has earned him an O1 visa from the United States, allowing him to do consultancy and lecture work there. 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.wordpress.com.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
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.
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.
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 184.108.40.206 database might run quickly against a 10.2.0.2 database, and why other code that ran quickly on Oracle 220.127.116.11 takes orders of magnitude longer on 10.2.0.2, 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".