Contents
Configuring the SQL*Plus Environment
Query Rewrite with Materialized Views
Determining the Execution Plan
Executing the Plan and Fetching Rows
SQL Execution: Putting It All Together
Chapter 3: Access and Join Methods
How Full Scan Operations Are Chosen
Full Scans and Multiblock Reads
Full Scans and the High-Water Mark
Moving from Procedural to Set-Based Thinking
Procedural vs. Set-Based Thinking: An Example
NULL Behavior in Set Operations
NULLs and GROUP BY and ORDER BY
Chapter 5: It’s about the Question
Chapter 6: SQL Execution Plans
Understanding How EXPLAIN PLAN Can Miss the Mark
Reading the Plan as a Narrative
Viewing Recently Generated SQL
Viewing the Associated Execution Plan
Collecting the Plan Statistics
Identifying SQL Statements for Later Plan Retrieval
Understanding DBMS_XPLAN in Detail
Using Plan Information for Solving Problems
Eliminate NULLs with the GROUPING( ) Function
Extending Reports with GROUPING( )
Extending Reports with GROUPING_ID( )
GROUPING SETS ( ) and ROLLUP( )
Aggregate Function over an Entire Partition
Granular Window Specifications
Example 1: Returning a Value from a Prior Row
Understanding That Offset Is in Rows
Example 2: Returning a Value from an Upcoming Row
Example: first_value to Calculate Maximum
Example: last_value to Calculate Minimum
Interrow Referencing Via the MODEL Clause
Positional and Symbolic References
Performance Tuning with the MODEL Clause
Partitioning in MODEL Clause Execution
Chapter 10: Subquery Factoring
Testing the Effects of Query Changes
Seizing Other Optimization Opportunities
Applying Subquery Factoring to PL/SQL
Duplicating CONNECT BY Functionality
The SYS_CONNECT_BY_PATH Function
The connect_by_iscycle Pseudocolumn and NOCYCLE Parameter
The connect_by_isleaf Pseudocolumn
Chapter 11: Semijoins and Antijoins
Controlling Semijoin Plans Using Hints
Controlling Semijoin Plans at the Instance Level
Controlling Antijoin Plans Using Hints
Controlling Antijoin Plans at the Instance Level
Hash Partitioning vs. Range Partitioning
Solutions to Match Application Characteristics
Solutions to Management Problems
Using INSERT APPEND vs. UPDATE
Chapter 14: Transaction Processing
ACID Properties of a Transaction
Transaction Control Statements
Grouping Operations into Transactions
Chapter 15: Testing and Quality Assurance
Adding Instrumentation to Code
Troubleshooting through Instrumentation
Plan Instability: Understanding the Problem
Capturing Data on Currently Running Queries
Reviewing the History of a Statement’s Performance
Aggregating Statistics by Plan
Looking for Statistical Variance by Plan
Checking for Variations around a Point in Time
Plan Control: Solving the Problem
Making Appropriate Use of Literals
Giving the Optimizer Some Hints
Plan Control: Without Access to the Code
Option 1: Change the Statistics
Option 2: Change Database Parameters
Option 3: Add or Remove Access Paths
Option 4: Apply Hint-Based Plan Control Mechanisms
Hint-Based Plan Control Mechanisms Wrap-up
Chapter 18: Miscellaneous SQL Constructs
18.116.36.194