Refactoring SQL Applications
By Stephane Faroult, Pascal L'Hermite
August 2008
Pages: 296
Series: Theory In Practice
ISBN 10: 0-596-51497-2 |
ISBN 13: 9780596514976
Press Release




(4) (Average of 1 Customer Reviews)


Description
What can you do when database performance doesn't meet expectations? This book offers methods for refactoring (or changing) SQL code to improve performance without altering a database application's purpose -- and helps you do it on a shoestring budget. This isn't a rehash of theory, but a tested set of options for making code modifications to dramatically improve the way your applications function.
Full Description
What can you do when database performance doesn't meet expectations? Before you turn to expensive hardware upgrades to solve the problem, reach for this book.
Refactoring SQL Applications provides a set of tested options for making code modifications to dramatically improve the way your database applications function. Backed by real-world examples, you'll find quick fixes for simple problems, in-depth answers for more complex situations, and complete solutions for applications with extensive problems. Learn to:
- Determine if and where you can expect performance gains
- Apply quick fixes, such as limiting calls to the database in stored functions and procedures
- Refactor tasks, such as replacing application code by a stored procedure, or replacing iterative, procedural statements with sweeping SQL statements
- Refactor flow by increasing parallelism and switching business-inducted processing from synchronous to asynchronous
- Refactor design using schema extensions, regular views, materialized views, partitioning, and more
- Compare before and after versions of a program to ensure you get the same results once you make modifications
Refactoring SQL Applications teaches you to recognize and assess code that needs refactoring, and to understand the crucial link between refactoring and performance. If and when your application bogs down, this book will help you get it back up to speed.
Featured customer reviews

Step-by-step guide to refactoring,
November 15 2008
Submitted by
Jelrik van Hal
[
Respond |
View]
For developers of applications making advanced usage of SQL based database engines, “Refactoring SQL Applications” is a step-by-step guide for improvement of overal performance. Stéphane Faroult takes his readers on a guided tour through the process of refactoring application code related to SQL and SQL data definition and manipulation statements: all the way from addressing possible problems to make sure they wont happen again.
By performing tests and providing statistics of the given code on three main database types (Oracle, MSSQL and MySQL), Faroult not only gives a broad view, but also stresses the differences in implementation of the SQL standards. All this information is very useful to the application developer.
In the first chapters, Faroult walks us through the different kinds of problems that can cause our performance issues. From problems in the client, application, code to indexing and from refactoring the iterative execution of one tiny statement to performance boosts to monster SQL statements. Everything is put into perspective: the boost gained by fixing issues most developers think of important can sometimes almost be nullified with statistics.
The last chapter is the guide to the real world process of refactoring. Faroult correctly starts on the assessment of performance problems in code you, as a developer, do not know: as he states, most refactoring jobs are done by someone that did not write the original application code.
The only drawback of this book might by its inaccessible language. It sometimes takes me, as a non-native speaker of English, a re-read or two to understand what the author intends to say. But of course, this book has enough useful content to compensate for that.
Read all reviews
Media reviews
"If I could, I'd have any developer on a database centric application read this, and DBAs as well. There is a lot here for both sides to learn about just how much they depend upon and impact one another. This may be an idealistic dream, especially for larger shops where often the relationship between those two groups is adversarial, but I think that such an approach could only make life much better for everyone involved."
-- JR Peck,
Slashdot.org
"Many books cover program refactoring, but there has been a lack of books on refactoring of database code, until now. Stéphane Faroult's new book has many advanced SQL techniques that I have been using in my own work. I enthusiastically recommend the book to others."
-- Michael Blaha, Consultant, OMT Associates Inc.
"Finally...a book that emphasizes the role of the SQL writer on overall
database performance, and what can be done to improve the situation.
This book should be required reading for any database professional
wanting to improve their own query writing, or queries written by others."
-- Dwayne King, President, KRIDAN Consulting
Read all reviews