Enter your mobile number 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.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Refactoring SQL Applications 1st Edition

3.5 out of 5 stars 8 customer reviews
ISBN-13: 063-6920514978
ISBN-10: 0596514972
Why is ISBN important?
ISBN
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used On clicking this link, a new layer will be open
$19.00 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$34.33 On clicking this link, a new layer will be open
More Buying Choices
25 New from $10.90 29 Used from $5.44
Free Two-Day Shipping for College Students with Prime Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


Excel2016ForDummiesVideo
Excel 2016 For Dummies Video Training
Discover what Excel can do for you with self-paced video lessons from For Dummies. Learn more.
$34.33 FREE Shipping. In Stock. Ships from and sold by Amazon.com. Gift-wrap available.
click to open popover

Editorial Reviews

About the Author

Stephane Faroult first discovered relational databases and the SQL language back in 1983. He joined Oracle France in their early days (after a brief spell with IBM and a bout of teaching at the University of Ottawa) and soon developed an interest in performance and tuning topics. After leaving Oracle in 1988, he briefly tried to reform and did a bit of operational research, but after one year, he succumbed again to relational databases. He has been continuously performing database consultancy since then, and founded RoughSea Ltd in 1998.

Pascal L'Hermite has been working with relational databases in OLTP, production and development environments on Oracle Databases for the past 12 years and on Microsoft SQL Server for the past 5 years.

NO_CONTENT_IN_FEATURE

New York Times best sellers
Browse the New York Times best sellers in popular categories like Fiction, Nonfiction, Picture Books and more. See more

Product Details

  • Paperback: 298 pages
  • Publisher: O'Reilly Media; 1 edition (September 1, 2008)
  • Language: English
  • ISBN-10: 0596514972
  • ISBN-13: 978-0596514976
  • Product Dimensions: 7 x 0.6 x 9.2 inches
  • Shipping Weight: 1.1 pounds (View shipping rates and policies)
  • Average Customer Review: 3.5 out of 5 stars  See all reviews (8 customer reviews)
  • Amazon Best Sellers Rank: #2,243,074 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

By R. Reid on July 16, 2009
Format: Paperback Verified Purchase
I'm at odds with the first two reviewers, but I think it depends on what you're looking for. This book is NOT about classical tuning. Classical tuning is "tune the server", and "tune the query".

The emphasis - in the preface and the excellent Chapter 6 - is that the real gains are usually elsewhere, when you have older code.

I work with a 25 year heritage of fairly well written apps. Many of them have the described situation - a single query that's been broken into two or more parts, with an outer loop and (at least one) inner loop. When server memories were 64K, or 1 Meg, or 4 Meg, and CPU's only came in packages of 1, and disk channels were slow, and networks were slower, this was often the only practical way to get a result.

The interplay changed over the years, but the old code worked. In the past few years, with 64-bit processors, cheap 64-CPU servers, and multi-io disk channels, a wierd thing happened. We found that moving to newer systems and faster hardware made things run SLOWER.

The answer time and again was in those "split loop queries". If we turned them back into one big query - the kind that you couldn't run before, we would see performance improvements of hundreds or thousands of times. In the end, the math proved - on powerful machines, most of the overhead is sending the query, compiling it, and sending it back. If one monster query takes a full second, but every query in the loop takes 1/4 second - if that inner loop runs 1000 times, you lose.

Meantime, that 64-core machine has every CPU working full blast - recompiling the same stupid statement over and over! The problem is, you try to tell this to a developer, they don't beleive you "I didn't change anything in the code".
Read more ›
Comment 9 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
Faroult and Hermite focus their attention on relatively classical SQL optimizations. The gist of their advice is that developers running SQL code need to leverage the database engine's optimizer. To do that, they offer relatively common advice: use set operations, avoiding procedural code in your sql code whenever possible; minimize the number of visits to a table; and minimize the number of times your code has to scan a given table. Most of the content of the book is spent offering techniques for achieving these objectives. For developers without a lot of experience writing SQL intensive applications, the authors provide a relatively accessible discussion of these techniques.

Outside of that, the authors include a chapter called `Testing Framework' that addresses one of the key requirements of any refactoring effort: creating and maintaining a library of unit tests that allows us to prove that our code is correct. When writing database code, and particular code whose performance may vary based on the amount of data being processed, unit testing can be a bit of a challenge due to the typical case where developers are developing locally on databases that contain small data sets. In this chapter Faroult and Hermite offer some data generation techniques and some mechanisms for automating the comparison of resulting outputs.

What I like about this book is that unlike books on optimizing the performance of a particular database product, this book tries to elevate the discussion to the level of optimizing the performance of an application that contains a substantial amount of realistic database code. It should enable developers to analyze their code in the context of the business objectives that it is trying to fulfill, rather than the context of the database engine in which it is executing. For that reason alone, I am recommending it to the database developers on my team.
2 Comments 9 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback Verified Purchase
The only problem I had with this book is my own lack of SQL skill; it would be an excellent choice for someone who's past the rookie stage. I'm still at the "oh-crap-what-do-I-do" point when a query blows up in my face because I think sequentially rather than relationally, and there's no way around that except practice.
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Kindle Edition Verified Purchase
Here is what I was looking for in a book and did not find here:
A set of SQL refactoring patterns - like what Martin Fowler offers in his book for oo languages.

I want to know stuff like:
How do i remove duplication in SQL.
How to make the code more readable/clear and decoupled
how do i change the structure of queries without changing the results.
how do i turn a set of subqueries with similar/same criteria into another structure

What I got instead
a book about tuning and performance improvements
a book about embedded sql app-dev refactoring

I'm moderately disappointed, but I think this book will give me some knowledge that may help me invent 'real' t-sql refactoring patterns.
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Set up an Amazon Giveaway

Refactoring SQL Applications
Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more about Amazon Giveaway
This item: Refactoring SQL Applications