Refactoring SQL Applications and over one million other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
Refactoring SQL Applications
 
 
Start reading Refactoring SQL Applications on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Refactoring SQL Applications [Paperback]

Stephane Faroult , Pascal L'Hermite
4.0 out of 5 stars  See all reviews (1 customer review)
RRP: £34.50
Price: £23.43 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £11.07 (32%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Only 1 left in stock--order soon (more on the way).
Want guaranteed delivery by Thursday, June 7? Choose Express delivery at checkout. See Details

Formats

Amazon Price New from Used from
Kindle Edition £18.75  
Paperback £23.43  
Amazon.co.uk Trade-In Store
Did you know you can trade in your old books for an Amazon.co.uk Gift Card to spend on the things you want? Plus, get an extra £5 Gift Certificate when you trade in books worth £10 or more before June 30, 2012. Visit the Books Trade-In Store for more details.

Product details

  • Paperback: 304 pages
  • Publisher: O'Reilly Media; 1 edition (29 Aug 2008)
  • Language English
  • ISBN-10: 0596514972
  • ISBN-13: 978-0596514976
  • Product Dimensions: 23.3 x 17.9 x 1.5 cm
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (1 customer review)
  • Amazon Bestsellers Rank: 929,409 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Stéphane Faroult
Discover books, learn about writers, and more.

Visit Amazon's Stéphane Faroult Page

Product Description

Product 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.

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.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organise and find favourite items.
Your tags: Add your first tag
 

Customer Reviews

5 star
0
3 star
0
2 star
0
1 star
0
Most Helpful Customer Reviews
2 of 2 people found the following review helpful
Format:Paperback|Amazon Verified Purchase
This is a good book. It's not a book on configuring SQL servers, or teaching you about SQL itself. It is a book about the performance of SQL and SQL applications.

The content of the book is unique because it is based on experience of the real world, not database theory. In the real world, indices don't always speed things up - and there are a myriad of reason this could be.

The book works up from a gentle start, working with some simple but effective examples, and discussing theory and then real work practise. A good set of topics are covered, from the SQL queries themselves, to the applications that call SQL, through to concurrent use of a single SQL server.

Reading this book will give you the wisdom of someone elses years of experience and toil - and that is truly valuable.

The only things this book could improve on are relatively minor; printing on low quality paper and bound cheaply, text could do with a little more editing, and the main body of the text could avoid away some of the overly complicated code examples.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com:  5 reviews
9 of 9 people found the following review helpful
Its the context that counts 2 Mar 2009
By Tom Spitzer - Published on Amazon.com
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.
6 of 6 people found the following review helpful
For some shops, THE book you need 16 July 2009
By R. Reid - Published on Amazon.com
Format:Paperback|Amazon 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".

And that's what this book is about. Changing the code. This book validates what I've been trying to tell my managers and coders; I am grateful to Faoult and L'Hermite for showing I was not making this up myself.

The second reviewer is just reading the wrong book for whatever it is they are trying to do.

This is an essential book for certain people, and is certainly of no interest whatsoever for others. (If you don't own a 1941 Plymouth, the 1941 Plymouth manual isn't much use - otherwise, it's a must).
2 of 2 people found the following review helpful
Ask Felgall - Book Review 12 Dec 2011
By Stephen Chapman - Published on Amazon.com
Format:Paperback
Any application that accesses a database will eventually present you with queries that run much slower than is desirable. This book provides you with a guide to how to resolve such problems and get your database accesses to run faster.

The most often suggested solutions are not always the correct ones and this book clearly demonstrates several situations where doing what appears to be an obvious fix (such as adding an index) may actually make things worse.

The author of this book has an in-depth understanding of how databases really work and as a result of the explanations that are provided in this book you can leverage on that to improve the performance of your SQL without needing as complete an understanding as the author has. If anything the book will actually help to give you a greater understanding of how databases work.

Are you going to know where to look when you next have a progr
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!

Create a Listmania! list

Look for similar items by category


Look for similar items by subject


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges