- Shopping Bag ( 0 items )
Other sellers (Paperback)
-
All (13) from $12.00
-
New (6) from $38.36
-
Used (7) from $12.0
More About This Textbook
Overview
Improve Database Performance by Tuning SQL Statements
Tune all types of SQL statements—from a simple SELECT statement to a complex non-correlated subquery—using tips and techniques from SQL expert Don Burleson. Officially authorized by Oracle
Corporation
this in-depth resource explains how to take any SQL statement, view the internal execution plan, and change the execution plan to improve the performance of the statement. You'll get details on Oracle's optimizer modes, SQL extensions, the STATSPACK utility, and a wealth of methods for tuning Oracle SQL statements.From the official Oracle Press comes a comprehensive guide to tuning SQL statements for optimal execution. This expert resource explains how to view the internal execution plan of any SQL statement and change it to improve the performance of the statement. You'll get details on Oracle's optimizer modes, SQL extensions, the STATSPACK utility, and a wealth of methods for tuning Oracle SQL statements.
Product Details
Related Subjects
Meet the Author
Don Burleson (Kittrell, NC) has 20 years of experience as a database administrator and has written 9 books on database management including Oracle SAP Administration (O’Reilly), High-Performance Oracle8 Tuning, High-Performance Oracle Data Warehousing, High-Performance Oracle Database Applications (Coriolis) and Oracle8 Tuning, German Edition (Sybex). Don has taught more than 100 University courses and regularly conducts in-house Oracle training.
Read an Excerpt
Chapter 1: Introduction to SQL
The acronym "SQL" is short for Structured Query Language. Unfortunately, SQL is not structured, SQL is not only for queries, and SQL is not a language, per se, because SQL is embedded within other languages such as C and COBOL. Regardless of the mistaken name, SQL has emerged as the dominant access method for relational databases.This chapter will introduce the nature of Oracle SQL and lay the foundation for techniques that we will be using throughout this book. In this chapter, we will cover the following topics.
The Basic Nature of SQL
The SQL standard proposal was originally created as an alternative to the cumbersome navigational languages of existing databases. In the 1960s, the IBM IMS database was the only large-scale commercial database management system. Unlike databases on the relational model, IMS is a hierarchical database with an internal pointer structure used for navigating between database records.The navigational database access tools required the programmer to navigate through the data structures by means of pointer chasing. Here is an actual example of a query from the popular IDMS database, an early CODASYL network database...
...Here we see that the query navigates between data records, accessing the record, finding a pointer, and moving between pointers according to the pointer values (as shown in Figure 1-1). The point is that this type of database query requires knowledge of the internal structures of the database in order to extract data.
The equivalent statement in SQL is quite different in syntax and function. Unlike a navigational database access language, SQL is designed to require only a specification of the columns you want to display, the tables that contain the data, and the join criteria for the tables....
We will take a closer look at the basic structure of SQL later in this chapter. While SQL is generally associated with relational databases, it is important to note that SQL is also popular in nonrelational databases. The IDMS network database developers renamed their product to IDMS/R after they created a SQL engine, and several object-oriented databases now offer SQL front ends that make their databases appear to be relational.
The Beginnings of SQL
In 1970, Dr. Edgar Codd of IBM and Chris Date developed a relational model for data storage. In the model, data would be stored in simple linear structures called "relations" or "tables." One of the best improvements of the relational model over its predecessors was its simplicity. Rather than requiring users to know dozens of navigational data manipulation Language (DML) commands, the relational model introduced a declarative language called SQL to simplify data access and manipulation.In Codd and Date's model, the tables are represented as two-dimensional arrays of "rows" and "columns." Rows were called "tuples" (rhymes with "couples"), and columns were called "attributes." A table will always have a field or several fields that make a "primary key" for a table. In their relational database model, the tables are independent, unlike in hierarchical and network models, where they are pointerconnected.
The relational database model offered the following improvements over the existing hierarchical and network databases:
A Model for SQL
The first model of SQL can be thought of as having three categories of function: Define, Manipulate, and Authorize.Select Operation
A select operation reduces the length of a table by filtering out unwanted rows. By specifying conditions in the where clause, the user can filter unwanted rows out of the result set, as shown in Figure 1-2. In sum, the select operation reduces the results vertically.Project Operation
Just as the select operation reduces the number of rows, the project operation reduces the number of columns. The column names specified in the SQL select determine those columns that are displayed, as shown in Figure 1-3. In sum, the project operation reduces the size of the result set horizontally.Join Operation
A join operation such as is shown in Figure 1-4 is used to relate two or more independent tables that share a common column. In a join, two or more independent tables are merged according to a common column value....Table of Contents
PART I Background
1 Introduction to SQL2 Overview of Oracle SQL Extensions
3 Understanding SQL Execution
4 Overview of the SQL Optimizers
5 SQL Internal Processing
6 Tuning SQL Table Access
PART II Basic SQL Tuning
7 The Steps to Oracle SQL Tuning
8 Understanding Oracle SQL Utilities
9 Locating Significant SQL Statements
10 Tuning Full-Table Scans and Parallel Query
11 Optimizing Sorting for Oracle SQL Statements
12 Tuning with Oracle Hints
13 Tuning with Optimizer Plan Stability
14 Tuning with the Cost-Based Optimizer
15 Tuning with the Rule-Based Optimizer
16 Tuning Table Joins
PART III Advanced SQL Tuning
17 Tuning SQL DML Statements
18 Tuning SQL with Temporary Tables
19 Tuning SQL Subqueries
20 Tuning SQL with Indexes
21 Tuning Data Warehouse SQL
22 SQL Tuning with STATSPACK
23 Tuning SQL with Built-in Functions and Special OperatorsIndex
PART I Background
1 Introduction to SQL
2 Overview of Oracle SQL Extensions
3 Understanding SQL Execution
4 Overview of the SQL Optimizers
5 SQL Internal Processing
6 Tuning SQL Table Access
PART II Basic SQL Tuning
7 The Steps to Oracle SQL Tuning
8 Understanding Oracle SQL Utilities
9 Locating Significant SQL Statements
10 Tuning Full-Table Scans and Parallel Query
11 Optimizing Sorting for Oracle SQL Statements
12 Tuning with Oracle Hints
13 Tuning with Optimizer Plan Stability
14 Tuning with the Cost-Based Optimizer
15 Tuning with the Rule-Based Optimizer
16 Tuning Table Joins
PART III Advanced SQL Tuning
17 Tuning SQL DML Statements
18 Tuning SQL with Temporary Tables
19 Tuning SQL Subqueries
20 Tuning SQL with Indexes
21 Tuning Data Warehouse SQL
22 SQL Tuning with STATSPACK
23 Tuning SQL with Built-in Functions and Special Operators