Details

Oracle Database Performance and Scalability


Oracle Database Performance and Scalability

A Quantitative Approach
Quantitative Software Engineering Series, Band 12 1. Aufl.

von: Henry H. Liu

96,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 24.10.2011
ISBN/EAN: 9781118135495
Sprache: englisch
Anzahl Seiten: 500

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

The innovative performance and scalability features with each newer edition of the Oracle database system can present challenges for users. This book teaches software developers and students how to effectively deal with Oracle performance and scalability issues throughout the entire life cycle of developing Oracle-based applications. Using real-world case studies to deliver key theories and concepts, the book introduces highly dependable and ready-to-apply performance and scalability optimization techniques, augmented with Top 10 Oracle Performance and Scalability Features as well as a supplementary support website.
<p>Preface xxv</p> <p>Why This Book xxv</p> <p>Who This Book is for xxvi</p> <p>How This Book is Organized xxvii</p> <p>Software and Hardware xxviii</p> <p>How to Use This Book xxix</p> <p>How to Reach the Author xxxi</p> <p>Acknowledgments xxxiii</p> <p><b>Introduction 1</b></p> <p>Features of Oracle 2</p> <p>Objectives 4</p> <p>Conventions 5</p> <p>Performance versus Scalability 6</p> <p><b>Part 1 Getting Started with Oracle 7</b></p> <p><b>1 Basic Concepts 9</b></p> <p>1.1 Standard versus Flavored SQLS 10</p> <p>1.2 Relational versus Object-Oriented Databases 11</p> <p>1.3 An Instance versus a Database 11</p> <p>1.4 Summary 12</p> <p>Recommended Reading 12</p> <p>Exercises 12</p> <p><b>2 Installing Oracle Software 14</b></p> <p>2.1 Installing Oracle 11g Server Software 15</p> <p>2.2 Configuring a Listener 18</p> <p>2.3 Creating an Oracle Database 18</p> <p>2.4 Installing Oracle 11g Client Software 28</p> <p>2.5 Oracle Grid Control versus DB Control 31</p> <p>2.6 Summary 33</p> <p>Recommended Reading 33</p> <p>Exercises 33</p> <p><b>3 Options for Accessing an Oracle Server 34</b></p> <p>3.1 A Command Line Interface (CLI) versus a GUI-Based Console 35</p> <p>3.2 The Oracle Enterprise Manager Java Console (OEMJC) 37</p> <p>3.3 Using the SQL*Plus Tool 40</p> <p>3.4 Oracle Enterprise Manager DBConsole 42</p> <p>3.5 Other Tools for Developers 43</p> <p>3.6 Case Study: Creating ER Diagrams with Visio via ODBC 44</p> <p>3.7 Case Study: Accessing Oracle in Java via JDBC 47</p> <p>3.8 Summary 49</p> <p>Recommended Reading 50</p> <p>Exercises 50</p> <p><b>4 A Quick Tour of an Oracle Server 52</b></p> <p>4.1 New Oracle Schemas Beyond “Scott” 53</p> <p>4.2 Oracle Users versus Schemas 54</p> <p>4.3 Tablespaces, Segments, Extents, and Data Blocks 56</p> <p>4.4 Tables, Indexes and Index Types for Structured Data 57</p> <p>4.5 Domain and LOB Index Types for Unstructured Data 65</p> <p>4.6 Views, Materialized Views, and Synonyms 68</p> <p>4.7 Stored Procedures, Functions, and Triggers 68</p> <p>4.8 Referential Integrity with Foreign Keys 71</p> <p>4.9 Summary 73</p> <p>Recommended Reading 73</p> <p>Exercises 74</p> <p><b>Part 2 Oracle Architecture from Performance and Scalability Perspectives 75</b></p> <p><b>5 Understanding Oracle Architecture 79</b></p> <p>5.1 The Version History of Oracle 80</p> <p>5.2 Oracle Processes 82</p> <p>5.3 Oracle Memory Areas 87</p> <p>5.4 Dedicated versus Shared Oracle Server Architecture 89</p> <p>5.5 Performance Sensitive Initialization Parameters 91</p> <p>5.6 Oracle Static Data Dictionary Views 94</p> <p>5.7 Oracle Dynamic Performance (V$) Views 95</p> <p>5.8 Summary 98</p> <p>Recommended Reading 98</p> <p>Exercises 99</p> <p><b>6 Oracle 10g Memory Management 101</b></p> <p>6.1 SGA Sub-Areas 102</p> <p>6.2 SGA Sizing: Automatic Shared Memory Management (ASMM) 104</p> <p>6.3 PGA Sizing: PGA_AGGREGATE_TARGET 106</p> <p>6.4 Summary 108</p> <p>Recommended Reading 109</p> <p>Exercises 110</p> <p><b>7 Oracle 11g Memory Management 111</b></p> <p>7.1 Automatic Memory Management (AMM) 112</p> <p>7.2 Memory Sizing Options Configurable at Database Creation Time 112</p> <p>7.3 Checking Memory Management and Usage Distribution at Run Time 113</p> <p>7.4 Summary 115</p> <p>Recommended Reading 115</p> <p>Exercises 115</p> <p><b>8 Oracle Storage Structure 116</b></p> <p>8.1 Overview 117</p> <p>8.2 Managing Tablespaces 119</p> <p>8.3 Managing Data Files 122</p> <p>8.4 Managing Redo Logs 124</p> <p>8.5 Summary 125</p> <p>Recommended Reading 125</p> <p>Exercises 126</p> <p><b>9 Oracle Wait Interface (OWI) 127</b></p> <p>9.1 Ratio-based versus OWI-based Oracle Performance Tuning Methodologies 128</p> <p>9.2 Wait Event—The Core Concept of OWI 130</p> <p>9.3 Classification of Wait Events from OWI 131</p> <p>9.4 The Other Part (CPU Time) of the Equation Elapsed Time = CPU Time + Wait Time 134</p> <p>9.5 AWR as a Compass to Tuning Oracle Performance and Scalability 136</p> <p>9.6 Summary 137</p> <p>Recommended Reading 137</p> <p>Exercises 138</p> <p><b>10 Oracle Data Consistency and Concurrency 139</b></p> <p>10.1 Select . . . for Update Statement 140</p> <p>10.2 ACID Properties of Transactions 141</p> <p>10.3 Read Phenomena and Data Inconsistencies 143</p> <p>10.4 Oracle Isolation Levels 145</p> <p>10.5 Multi-Version Concurrency Control (MVCC) and Read Consistency 145</p> <p>10.6 Oracle Locks 146</p> <p>10.7 Lock Escalations versus Conversions 149</p> <p>10.8 Oracle Latches 149</p> <p>10.9 Oracle Enqueues 150</p> <p>10.10 Deadlocks 150</p> <p>10.11 Taking Advantage of Oracle’s Scalable Concurrency Model 151</p> <p>10.12 Case Study: A JDBC Example 152</p> <p>10.13 Summary 158</p> <p>Recommended Reading 159</p> <p>Exercises 159</p> <p><b>11 Anatomy of an Oracle Automatic Workload Repository (AWR) Report 161</b></p> <p>11.1 Importance of Performance Statistics 162</p> <p>11.2 AWR Report Header 165</p> <p>11.3 Report Summary 166</p> <p>11.4 Main Report 171</p> <p>11.5 Wait Events Statistics 172</p> <p>11.6 SQL Statistics 178</p> <p>11.7 Instance Activity Statistics 185</p> <p>11.8 IO Stats 197</p> <p>11.9 Buffer Pool Statistics 199</p> <p>11.10 Advisory Statistics 199</p> <p>11.11 Wait Statistics 206</p> <p>11.12 Undo Statistics 207</p> <p>11.13 Latch Statistics 208</p> <p>11.14 Segment Statistics 215</p> <p>11.15 Dictionary Cache Stats 218</p> <p>11.16 Library Cache Activity 219</p> <p>11.17 Memory Statistics 219</p> <p>11.18 Streams Statistics 222</p> <p>11.19 Resource Limit Stats 224</p> <p>11.20 init.ora Parameters 224</p> <p>11.21 Summary 225</p> <p>Recommended Reading 225</p> <p>Exercises 226</p> <p><b>12 Oracle Advanced Features and Options 227</b></p> <p>12.1 Oracle 8i New Features 227</p> <p>12.2 Oracle 9i New Features 233</p> <p>12.3 Oracle 10g New Features 241</p> <p>12.4 Oracle 11g New Features 248</p> <p>12.5 Summary 255</p> <p>Recommended Reading 255</p> <p>Exercises 255</p> <p><b>13 Top 10 Oracle Performance and Scalability Features 257</b></p> <p>13.1 Real Application Clustering (RAC) 258</p> <p>13.2 Dedicated versus Shared Server Models 260</p> <p>13.3 Proven Transaction and Concurrency Models 260</p> <p>13.4 A Highly Efficient SQL Optimization Engine 261</p> <p>13.5 Efficient Parallel Processing with Modern Multi-Core CPUs 261</p> <p>13.6 Partitioning 262</p> <p>13.7 An All-Encompassing, Powerful Performance, and Scalability Troubleshooting Tool—AWR 262</p> <p>13.8 The Most Comprehensive Set of Internal Performance Metrics 263</p> <p>13.9 Database Resident Connection Pool 263</p> <p>13.10 In-Memory Database Cache (IMDB) 263</p> <p>13.11 Summary 263</p> <p>Recommended Reading 264</p> <p>Exercises 264</p> <p><b>14 Oracle-Based Application Performance and Scalability by Design 266</b></p> <p>14.1 Rapid Development Methodologies 268</p> <p>14.2 Planning 269</p> <p>14.3 Requirements Gathering 272</p> <p>14.4 Conceptual Design via Data Modeling 275</p> <p>14.5 Logical Design via Normalization 280</p> <p>14.6 Physical Design 295</p> <p>14.7 Implementation 315</p> <p>14.8 Release to Market (RTM) 322</p> <p>14.9 Continuous Improvements 322</p> <p>14.10 Summary 323</p> <p>Recommended Reading 324</p> <p>Exercises 325</p> <p><b>15 Project: Soba—A Secure Online Banking Application on Oracle 326</b></p> <p>15.1 Getting SOBA Up and Running 328</p> <p>15.2 Overview of Spring Framework 333</p> <p>15.3 MVC Architecture 337</p> <p>15.4 Spring MVC Framework Applied to SOBA 342</p> <p>15.6 RESTful Web Services Applied to SOBA 376</p> <p>15.7 Spring Security Applied to SOBA 386</p> <p>15.8 Spring ACL Applied to SOBA 394</p> <p>15.9 Summary 413</p> <p>Recommended Reading 414</p> <p>Exercises 414</p> <p><b>Part 3 Optimizing Oracle Performance and Scalability 415</b></p> <p><b>16 Logistics of the Oracle Cost-Based Optimizer (CBO) 417</b></p> <p>16.1 Life of a SQL Statement in Oracle 418</p> <p>16.2 Oracle SQL Optimizer: Rule-Based versus Cost-Based 420</p> <p>16.3 CBO Statistics 421</p> <p>16.4 Pivot Role of Gathering Database Statistics to CBO 422</p> <p>16.5 Methods of Gathering CBO Statistics 424</p> <p>16.6 Locking and Unlocking CBO Statistics 425</p> <p>16.7 Explain Plan—A Handle to CBO 425</p> <p>16.8 Data Access Methods—CBO’s Footprints 426</p> <p>16.9 Looking Up CBO’s Plan Hidden in V$SQL*PLAN 427</p> <p>16.10 When CBO may Generate Suboptimum Execution Plans 428</p> <p>16.11 Summary 429</p> <p>Recommended Reading 429</p> <p>Exercises 430</p> <p><b>17 Oracle SQL Tuning 431</b></p> <p>17.1 Tuning Joins 432</p> <p>17.2 Tuning Subqueries 437</p> <p>17.3 Case Study: Performance of SUBQUERY versus JOIN 439</p> <p>17.4 Case Study: Performance of IN versus EXISTS 443</p> <p>17.5 Case Study: A SQL Tuning Yielded a 12x Performance Gain 444</p> <p>17.6 Summary 447</p> <p>Recommended Reading 447</p> <p>Exercises 448</p> <p><b>18 Oracle Indexing 449</b></p> <p>18.1 Rules of Thumb on Indexing 450</p> <p>18.2 Creating and Using Ubiquitous b-Tree Indexes 451</p> <p>18.3 Advanced Indexing Scheme I: Covering Indexes versus Index-Organized Tables 452</p> <p>18.4 Advanced Indexing Scheme II: Function-Based Indexes (FBIs) 453</p> <p>18.5 Unusual Indexing Scheme I: BITMAP Indexes 454</p> <p>18.6 Unusual Indexing Scheme II: Reverse Key Indexes 455</p> <p>18.7 Unusual Indexing Scheme III: Compressed Composite Indexes 455</p> <p>18.8 How to Create Oracle Indexes 456</p> <p>18.9 Summary 457</p> <p>Recommended Reading 458</p> <p>Exercises 458</p> <p><b>19 Auto_Tune Features 459</b></p> <p>19.1 Oracle Automatic Database Diagnostic Monitor (ADDM) 460</p> <p>19.2 Automatic Undo Management 462</p> <p>19.3 Data Recovery Advisor 462</p> <p>19.4 Memory Advisors 462</p> <p>19.5 MTTR Advisor 466</p> <p>19.6 Segment Advisor 466</p> <p>19.7 SQL Advisors 467</p> <p>19.8 SQL Performance Analyzer 469</p> <p>19.9 Summary 470</p> <p>Recommended Reading 471</p> <p>Exercises 471</p> <p><b>Part 4 Case Studies: Oracle Meeting Real World Performance and Scalability Challenges 473</b></p> <p><b>20 Case Study: Achieving High Throughput with Array Processing 477</b></p> <p>20.1 Context 478</p> <p>20.2 Performance Model 479</p> <p>20.3 Tests 480</p> <p>20.4 Solution 480</p> <p>20.5 Effects of Array Processing 482</p> <p>20.6 Summary 484</p> <p>Recommended Reading 484</p> <p>Exercises 484</p> <p><b>21 Case Study: Performance Comparison of Heap-Organized versus Index-Organized Tables 485</b></p> <p>21.1 Context 486</p> <p>21.2 Conversion from Heap-Organized to Index-Organized 487</p> <p>21.3 Creating Indexes 487</p> <p>21.4 Creating Constraints 488</p> <p>21.5 EXPLAIN PLANs 488</p> <p>21.6 Oracle SQL Traces 489</p> <p>21.7 Summary 490</p> <p>Recommended Reading 491</p> <p>Exercises 491</p> <p><b>22 Case Study: SQL Tuning: “IN” versus “OR” versus Global Temporary Table 492</b></p> <p>22.1 Context 493</p> <p>22.2 Test Program 494</p> <p>22.3 Observation 1: IN_CreateStatement is the Best Performer 495</p> <p>22.4 Observation 2: Batch Insert Saves Time 497</p> <p>22.5 Temptable Performed Better without an Index Hint than with an Index Hint 498</p> <p>22.6 Effects of APPEND Hint for Populating Temptable 499</p> <p>22.7 Effects of Number of Iterations 499</p> <p>22.8 OR and IN without the Index Hint 499</p> <p>22.9 Limitation on the Number of Literal Values and the Size of OR Statement 501</p> <p>22.10 Dealing with More Than 1000 Literal Values for an IN Based SQL Query 501</p> <p>22.11 A Recommendation for Dealing with 1000 Literal Value Limit in an IN Statement 501</p> <p>22.12 Summary 502</p> <p>Recommended Reading 503</p> <p>Exercises 503</p> <p><b>23 Case Study: Data Access Paths (Double Buffering) 504</b></p> <p>23.1 Data Access Paths in General 505</p> <p>23.2 Test Environments 511</p> <p>23.3 Test Results with Solaris on Veritas 514</p> <p>23.4 Test Results with Solaris on UFS 522</p> <p>23.5 Test Results with Windows on NTFS 526</p> <p>23.6 Moral of the Case Study 528</p> <p>Recommended Reading 529</p> <p>Exercises 530</p> <p><b>24 Case Study: Covering Index 531</b></p> <p>24.1 Getting to Know the Application Architecture 533</p> <p>24.2 Quantifying the Problems 533</p> <p>24.3 Analyzing Bottlenecks 533</p> <p>24.4 Applying Optimizations/Tunings 535</p> <p>24.5 Verifying the Fixes 535</p> <p>24.6 Moral of the Case Study 545</p> <p>Recommended Reading 546</p> <p>Exercises 546</p> <p><b>25 Case Study: CURSOR_SHARING 547</b></p> <p>25.1 The Concept of a Bind Variable 548</p> <p>25.2 Oracle CURSOR_SHARING Parameter 549</p> <p>25.3 Getting to Know the Application Architecture 550</p> <p>25.4 Quantifying Problems 550</p> <p>25.5 Analyzing Bottlenecks 551</p> <p>25.6 Applying Tuning: CURSOR_SHARING = FORCE 560</p> <p>25.7 Applying Tuning: CURSOR_SHARING = SIMILAR 564</p> <p>25.8 Moral of the Case Study 569</p> <p>Recommended Reading 569</p> <p>Exercises 570</p> <p><b>26 Case Study: Bulk Transactions 571</b></p> <p>26.1 Application Architecture 572</p> <p>26.2 Quantifying Problems 572</p> <p>26.3 Identifying Performance and Scalability Optimization Opportunities 573</p> <p>26.4 Effects of Bulk Transactions on Performance 581</p> <p>26.5 Moral of the Case Study 592</p> <p>Recommended Reading 593</p> <p>Exercises 593</p> <p><b>27 Case Study: Missing Statistics 594</b></p> <p>27.1 Decaying Performance due to Missing Statistics 595</p> <p>27.2 First Run with no Statistics 597</p> <p>27.3 Second Run with Missing Statistics 604</p> <p>27.4 Third Run with Updated Statistics 611</p> <p>27.5 Moral of the Case Study 618</p> <p>Recommended Reading 618</p> <p>Exercises 618</p> <p><b>28 Case Study: Misconfigured SAN Storage 620</b></p> <p>28.1 Architecture of the Apple’s Xserve RAID 621</p> <p>28.2 Problem Analysis 622</p> <p>28.3 Reconfiguring the RAID and Verifying 626</p> <p>28.4 Moral of the Case Study 629</p> <p>Recommended Reading 630</p> <p>Exercises 630</p> <p><b>Appendix A Oracle Product Documentations 633</b></p> <p>A.1 Oracle Database Concepts 633</p> <p>A.2 Oracle Database Administrator’s Guide 633</p> <p>A.3 Oracle Database Reference 634</p> <p>A.4 Oracle Database Performance Tuning Guide 634</p> <p>A.5 Oracle Database 2 Day + Performance Tuning Guide 634</p> <p>A.6 Oracle Database 2 Day DBA 634</p> <p>A.7 Oracle Database SQL Language Reference 634</p> <p>A.8 Oracle Database Sample Schemas 635</p> <p>A.9 Oracle Database PL/SQL Packages and Types Reference 635</p> <p>A.10 Oracle Database PL/SQL Language Reference 635</p> <p>A.11 Oracle Database JDBC Developer’s Guide and References 635</p> <p><b>Appendix B Using SQL*Plus with Oracle 636</b></p> <p>B.1 Installation 636</p> <p>B.2 SQL*Plus and tnsnames.ora File 637</p> <p>B.3 Basics of SQL*Plus 638</p> <p>B.4 Common SQL*Plus Commands 638</p> <p>B.5 Using SQL*Plus to Execute SQL Statements 639</p> <p>B.6 Using SQL*Plus to Execute PL/SQL Blocks 640</p> <p>B.7 Using SQL*Plus Autotrace to Obtain EXECUTION PLANs and Optimizer Statistics 640</p> <p>B.8 Using SQL*Plus Timing Command 641</p> <p>B.9 Exporting/Importing Oracle Databases with SQL*Plus 642</p> <p>B.10 Creating AWR Reports with SQL*Plus 643</p> <p>B.11 Checking Tablespace Usage with SQL*Plus 644</p> <p>B.12 Creating EM DBConsole with SQL*Plus 646</p> <p><b>Appendix C A Complete List of All Wait Events in Oracle 11g 648</b></p> <p><b>Appendix D A Complete List of All Metrics with the V$Statname View 656</b></p> <p><b>Appendix E A Complete List of All Statistics with the V$Sysstat View 667</b></p> <p>Index 681</p>
<p><b>HENRY H. LIU, P<small>H</small>D,</b> is a Software Developer at BMC Software, Inc., with a physicist background from his prior career. His primary responsibilities at BMC include helping build performance and scalability into BMC's cloud computing and enterprise service management software products. Dr. Liu is the author of the highly acclaimed Software Performance and Scalability: A Quantitative Approach (Wiley).
<p><b>A data-driven, fact-based, quantitative text on Oracle performance and scalability</b> <p>With database concepts and theories clearly explained in Oracle's context, readers quickly learn how to fully leverage Oracle's performance and scalability capabilities at every stage of designing and developing an Oracle-based enterprise application. The book is based on the author's more than ten years of experience working with Oracle, and is filled with dependable, tested, and proven performance optimization techniques. <p><i>Oracle Database Performance and Scalability</i> is divided into four parts that enable readers to progressively learn and apply new skills: <ul> <li>Part 1, Getting Started with Oracle, describes how to set up a working Oracle environment, offering a quick tour to illustrate major database concepts</li> <li>Part 2, Oracle Architecture from Performance and Scalability Perspectives, explains all the major database concepts and architectural features that readers need to know to optimize Oracle performance and scalability</li> <li>Part 3, Optimizing Oracle Performance and Scalability, offers hands-on instructions to optimize and fine-tune performance and scalability for all database applications</li> <li>Part 4, Case Studies: Oracle Meeting Real-World Performance and Scalability Challenges, sets forth quantitative case studies based on the author's first- hand experience that demonstrate how readers can apply proven techniques to dramatically improve the performance and scalability of actual database products</li> </ul> <p>In addition to case studies, this book offers a detailed secure online banking application as an example, making it possible for readers to fully explore Oracle's performance and scalability features on their own. <i>Oracle Database Performance and Scalability</i> is an ideal text for pre-conditioning college students and training software developers.

Diese Produkte könnten Sie auch interessieren:

The CISO Evolution
The CISO Evolution
von: Matthew K. Sharp, Kyriakos Lambros
PDF ebook
33,99 €
Data Mining and Machine Learning Applications
Data Mining and Machine Learning Applications
von: Rohit Raja, Kapil Kumar Nagwanshi, Sandeep Kumar, K. Ramya Laxmi
EPUB ebook
190,99 €