- Shopping Bag ( 0 items )
Want a NOOK? Explore Now
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:
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.
1 Assessment 1
A Simple Example 2
Assessing Possible Gains 19
2 Sanity Checks 37
Statistics and Data Skewness 38
Indexing Review 44
Parsing and Bind Variables 55
Bulk Operations 70
Transaction Management 73
3 User Functions and Views 75
User-Defined Functions 76
Views 103
4 Testing Framework 115
Generating Test Data 116
Comparing Alternative Versions 132
5 Statement Refactoring 147
Execution Plans and Optimizer Directives 148
Analyzing a Slow Query 152
Refactoring the Query Core 158
Rebuilding the Initial Query 176
6 Task Refactoring 179
The SQL Mindset 180
Restructuring the Code 185
7 Refactoring Flows and Databases 211
Reorganizing Processing 212
Shaking Foundations 233
8 How It Works: Refactoring in Practice 243
Can you Look at the Database? 243
Queries of Death 245
All These Fast Queries 247
No Obvious Very Wrong Query 248
Time to Conclude 249
A Scripts and Sample Programs 251
B Tools 261
Index 269
Overview
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 ...