Oracle Database 10g: Parallelism and Scalability Overview Seminar Student Guide D51929GC10 Edition 1.0 July 2007 D51952
Authors Joel Goodman Harald van Breederode Editor Atanu Raychaudhuri Graphic Designer Samir Mozumdar Publishers Srividya Rameshkumar Jobi Varghese Copyright 2007, Oracle. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Contents 1 Parallelism Concepts Objectives 1-2 Introduction to Parallel Execution 1-3 System Conditions to Implement Parallelism 1-4 Operations That Can Be Parallelized 1-5 Parallelization Rules 1-6 Enabling Parallel DML/DDL/QUERY 1-7 How Parallel Execution Works 1-9 The Granule 1-10 Parallel Operations 1-11 Parallel Execution with Real Application Clusters 1-12 How Parallel Execution Servers Communicate 1-13 Degree of Parallelism 1-14 Default Degree of Parallelism 1-15 Parallel Execution Plan 1-16 OTHER_TAG Column 1-17 Serial and Parallel Execution Plans 1-18 Parallel Plan Interpretation 1-19 Parallel Execution Server Pool 1-24 Minimum Number of Parallel Execution Servers 1-25 Object s PARALLEL Clause 1-26 PARALLEL Clause: Examples 1-27 Using Parallelization Hints 1-28 Parallelization Hints 1-29 Parallelism and Cost-Based Optimization 1-32 Summary 1-33 2 Types of Parallel Operations Objectives 2-2 Parallelization Rules Revisited 2-3 Enabling Parallel DML/DDL/QUERY 2-4 Parallel Query 2-6 Parallel Partitioned Table Scan 2-7 Parallel Partitioned Index Scan 2-8 Partitionwise Joins 2-9 iii
Non-Partitionwise Join: Example 2-10 Partial Partitionwise Join: Example 2-11 Full Partitionwise Join: Example 2-12 Partitionwise Join Compatibility 2-14 Parallel DDL 2-15 Space Management for Parallel DDL 2-16 Fragmentation and Parallelism 2-17 Creating Indexes in Parallel 2-18 Parallel DDL: Example 2-21 Parallel DML: Overview 2-22 When to Use Parallel DML 2-23 Restrictions on Parallel DML 2-25 Performance Benefits of Parallel DML 2-26 Automatic Parallelization of DML 2-27 Enabling Parallel DML 2-28 Parallel DML: Example 2-29 Direct-Path Insert 2-30 Enabling Direct-Path Insert 2-31 Direct-Path Insert Logging 2-32 PDML and Undo Segments 2-33 Recovery for PDML 2-34 PDML Locking: Considerations 2-36 Parallel Execution of Functions 2-38 Summary 2-39 3 Monitoring and Tuning Parallel Operations Objectives 3-2 Tuning Parameters for Parallel Execution 3-3 Using Default Parameter Settings 3-4 Balancing the Workload 3-5 Adaptive Multiuser and DOP 3-7 PX Message Pool 3-8 Using V$PX_PROCESS_SYSTAT 3-10 Shared Pool 3-11 PGA Sizing 3-12 Resource Manager and the DOP 3-13 Data Warehouse Scenario 3-15 Parameter Setting: Example 3-16 Are There Execution Problems? 3-17 Data Distribution and V$PQ_TQSTAT 3-18 Using Other Dynamic Performance Views 3-20 iv
Using V$PX_SESSION 3-22 Using V$PX_SESSTAT 3-23 Using V$PX_PROCESS 3-24 Using V$SYSSTAT 3-25 Tuning PDML 3-27 Summary 3-28 v