Monday, May 16, 2005

Optimizing Oracle Performance (Millsap, Holt)

There are certain "camps" in the worldwide Oracle community. For example, there is the "Oak Table Network" of "Oracle scientists" who seek thorough understandings of issues backed up by details, tests and proofs. Contrasting is the "Silver Bullet" family of field-tested generals who prefer rules of thumb and quick fixes even it means some false understandings and occasionally being wrong. Cary Millsap (of the Oak Table Network) stands as someone respected by both sides.

Cary Millsap worked at Oracle for 10 years on system performance before co-founding Hotsos in 1999 ( - register for free). He is one of the most trusted sources on matters of Oracle system performance, and "Optimizing Oracle Performance" is considered his finest work (4.5 out of 5 stars on Amazon). The best way to learn more about him is to see for yourself. Here are some of his most popular articles:

"Diagnosing Performance Problems" from Oracle Magazine. A brief summary of what is covered in this book:

"Introduction", the first chapter from "Optimizing Oracle Performance."Chapter 1:

"Case Study", the 12th chapter from "Optimizing Oracle Performance."Chapter 12 (Case Study):

"Performance Management: Myths and Facts." One of his most popular articles.

"Why a 99%+ Database Buffer Cache Hit Ratio is Not Ok." Another of his more popular articles.

While everyone will have their own favourite parts of the book, I think most readers would agree that getting a good taste of the author's performance tuning philosophy is one of the highlights. "Method R", not to be confused with "System R" (ie. SQL), is not about looking at STATSPACK, cache hit ratios, or V$ tables and guessing. The author wanted to devise a system to identify and resolve the top performance concerns of an organisation with reliable, predictable results. The first few chapters put this method in writing in perhaps the best way since the introduction of "YAPP" (Anjo Kolk).

"The performance enhancement possible with a given improvement is limited by the fraction of the execution time that the improved feature is used." - Amdahl's Law

After several years of research, the author discovered that Extended SQL Trace Data was at the centre of "Method R". Some of the articles should give you a good taste of what Extended SQL Trace data is, if you didn't know already. By the time you finish reading this book you will know exactly how to collect and interpret all the little "ela=17101 p1=10 p2=2213 p3=1 ..." within into something meaningful. For some, that justifies the price tag right there.

So in essence I would have re-named this book "Method R: Optimizing Oracle Performance Using Extended SQL Trace Data," because that is basically what this book is about. There are some reasonably "stand-alone" chapters on other topics, for instance on the Oracle Fixed View tables (Chapter 8) and on Queueing Theory (Chapter 9), but that is not the primary focus of the book.

Those that are expecting a more broad treatment of the subject of performance tuning may be justifiably disappointed that it basically covers only this narrow aspect. However, it is covered very well, and it isn't really covered anywhere else. The author makes no apologies for this, claiming that extended SQL trace data is the only resource you will ever need for diagnosing and solving performance problems.

"You cannot extrapolate detail from an aggregate." - Cary Millsap's preference of SQL extended trace data over fixed views (system-wide average performance characteristics)

Indeed, some people might contend that the author spends a little too much time stating his beliefs, defending them, and patting himself on the back. But I think it adds a certain flavour to the book, and I respect an author who backs up his statements.

"Proving that V$ data are superior to extended SQL trace data because of the 'missing time' issue is analagous to proving that its safer to be in a room with a hungry bear if you'll just close your eyes." - Cary Millsap

The book can be a tough read in the sense that the author goes very deep into the material, and generally each subject is treated thoroughly. Chapter 9 on Queueing Theory can be a particularly overwhelming chapter. But the material is served in bite-size pieces, and broken up with tips, tricks, stories, diagrams and code (sometimes 3+ pages worth at a time, embedded directly in the middle of a chapter). There are even worthwhile exercises at the end of each chapter.

In the end, I enjoyed this book and I'm glad I got it. I don't consider it a "must have" for your Oracle collection, but I definitely feel it is quite worthwhile. I recommend it especially to those who read his articles and were very comfortable with his writing style and philosophy, and also to those that need a book on extended SQL trace data (because this is basically the only one). But even those in the "Silver Bullet" camp will be glad to add another tool to their belt.

Thumbs up.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?