Sunday, July 5, 2009

Finding a good book brings controls back into life!!!! SQL Performance Tuning

I was reading Niemic Oracle performance tuning tips book, really lost hope in becoming a oracle tuning expert, the book was long winded, showing a little piece here a little piece there without introducing a overall tuning concept.
Same opionion here:
http://www.dbasupport.com/forums/archive/index.php/t-35457.html

Then read oracle wait interface, by the author of Oracle performance tuning 101, also long winded, a little bit here, a little bit there, got really desperate. Is Oracle performance tuning 101 the same thing?

Couldn't get Oracle performance tuning 101 in singapore library or kinokuniya, must buy from amazon.

Then searching searching in Amazon, reading reviews. Checking out free ebooks. Then finally found this book:

SQL Performance Tuning (Paperback)

by Peter Gulutzan (Author), Trudy Pelzer (Author)


The first few page immediately it builds the important concept, immediately things becomes clear, logic brought into chaos, chaos subdued and order emerged.

Actually to become successfully in life, is to bring order into chaos. To be more successful is to bring more order into chaos.

Reading this book bring back life, bring back order, bring back excitement, and hope into life, it is like holding a big toy in my hand that will dispel anxiety and boredom. Getting good books is very important.

SQL Performance Tuning


Found this book today at approximately 12 am July 05. Uploaded pdf copy to freedrive.com. Order book from singapore library.

When i read this in the book immediately i have a very good impression

Everybody has heard of sluggish SQL queries, or even whole systems, that a heroic someone improved with small effort. Usually the improvement is small too, so we will avoid extravagant promises. But we will make you the following guarantees.

  • You will be able to follow our arguments without deep thinking or hard work. All we assume is that you have basic knowledge of programming and standard SQL syntax. In fact, you can read this book on a plane or at the beach.
  • All of our observations have been confirmed by tests on real DBMSs within the last several months.
  • We know that "optimizing" is very different from "over-clocking," and we only discuss safe, rational, relational techniques.


  • Edit: July 08,09

    Wow, at first i find the second chapter of the book difficult to read, transivity and all, but after the 3rd reading at zzz lunchtime, wow it is a damn good book, very logical and straightforward:

    "

    Specific Tuning

    To this point, we've talked about general tuning of search conditions. Now we'll look at how you can improve your code using specific SQL operators.

    AND

    When everything else is equal, DBMSs will evaluate a series of ANDed expressions from left to right (except Oracle, which evaluates from right to left when the cost-based optimizer is operating). No rule says they must—that's just what they do. You can take advantage of this behavior by putting the least likely expression first or—if both expressions are equally likely—putting the least complex expression first. Then, if the first expression is false, the DBMS won't bother to evaluate the second expression.


    "


    "

    For this kind of statement, we believe the essential question is—Should there be an index on column1? So we've devoted a whole chapter to the subject of indexes—what they look like, what variations exist, how indexes affect data changes, and so on. In another chapter, we address the question of how to use EXPLAIN (or its equivalent) to find out whether your particular DBMS actually uses an index for a particular SELECT. That illustrates our priority—we think that the first priority is the concept: indexes. Certainly, though, we must also care about the method: diagnostic tools. We hope that, with the concepts firmly planted in your mind, you will quickly arrive at the right point. We don't recommend that you implement any idea in this book without testing it first—but without ideas, you'll flounder randomly between plans without knowing if your final choice really is the best one."




    No comments:

    Post a Comment