Refactoring SQL Applications

Af Stéphane Faroult, Pascal L'Hermite
Detaljer O'Reilly Media, Incorporated
ISBN 9780596514976
Sprog Engelsk
Vælg mellem
Pris 379,00 kr.
Paperback

Ikke på lager

Ikke på lager. Bestil nu og få den leveret om ca. 12 hverdage

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.

Preface; Why Refactor?; Refactoring Database Accesses; How This Book Is Organized; Audience; Assumptions This Book Makes; Conventions Used in This Book; Using Code Examples; Comments and Questions; Safari® Books Online; Acknowledgments;
Chapter 1: Assessment;
1.1 A Simple Example;
1.2 Assessing Possible Gains;
Chapter 2: Sanity Checks;
2.1 Statistics and Data Skewness;
2.2 Indexing Review;
2.3 Parsing and Bind Variables;
2.4 Bulk Operations;
2.5 Transaction Management;
Chapter 3: User Functions and Views;
3.1 User-Defined Functions;
3.2 Views;
Chapter 4: Testing Framework;
4.1 Generating Test Data;
4.2 Comparing Alternative Versions;
Chapter 5: Statement Refactoring;
5.1 Execution Plans and Optimizer Directives;
5.2 Analyzing a Slow Query;
5.3 Refactoring the Query Core;
5.4 Rebuilding the Initial Query;
Chapter 6: Task Refactoring;
6.1 The SQL Mindset;
6.2 Restructuring the Code;
Chapter 7: Refactoring Flows and Databases;
7.1 Reorganizing Processing;
7.2 Shaking Foundations;
Chapter 8: How It Works: Refactoring in Practice;
8.1 Can You Look at the Database?;
8.2 Queries of Death;
8.3 All These Fast Queries;
8.4 No Obvious Very Wrong Query;
8.5 Time to Conclude;Scripts and Sample Programs;
Chapter 1;
Chapter 2;
Chapter 3;
Chapter 4;
Chapter 5;
Chapter 6;
Chapter 7 (MySQL);Tools; mklipsum and lipsum; Roughbench;