Monday, August 16, 2010

Refactoring SQL Applications

"The application design is the most important factor in performance"
I've heard the phrase so many times, it doesn't even register on me. Sure the application design is the most important factor in performance, but what do I do about it? Well, "Refactoring SQL Applications" (RSA) is the book I've been waiting for. RSA lays out examples of how application coders tend to think either procedurally or object oriented and how this thinking can completely miss the boat when it comes to writing SQL and interacting with the database.
In RSA, Stephane Faroult, lays out examples of Java code, user defined functions and views and how a coders notions of modular procedural programing and/or object instantiation can run undermine database performance from cookie cutter reuse of code to table joins written in Java. If you've ever seen Tom Kyte's "Developer Super Session - The Best Way", then you know the best way is not to do it and his example is of a coders doing "count(*)" to find out how many loops to do or how big an array to layout. Tom explains the disasters this can create and how the best way is just to not do the count(*) and how this works by letting the database do the work. Letting the database do the work is explained clearly and with many examples from different perspectives in "Refactoring SQL Applications".

No comments:

Post a Comment