| Preface |
|
xxv | |
| Why This Book |
|
xxv | |
| Who This Book Is For |
|
xxvi | |
| How This Book Is Organized |
|
xxvii | |
| Software And Hardware |
|
xxviii | |
| How To Use This Book |
|
xxix | |
| How To Reach The Author |
|
xxxi | |
| Acknowledgments |
|
xxxiii | |
| Introduction |
|
1 | (6) |
|
|
|
2 | (2) |
|
|
|
4 | (1) |
|
|
|
5 | (1) |
|
Performance versus Scalability |
|
|
6 | (1) |
| Part 1 Getting Started With Oracle |
|
7 | (68) |
|
|
|
9 | (5) |
|
1.1 Standard versus Flavored SQLS |
|
|
10 | (1) |
|
1.2 Relational versus Object-Oriented Databases |
|
|
11 | (1) |
|
1.3 An Instance versus a Database |
|
|
11 | (1) |
|
|
|
12 | (1) |
|
|
|
12 | (1) |
|
|
|
12 | (2) |
|
2 Installing Oracle Software |
|
|
14 | (20) |
|
2.1 Installing Oracle 11g Server Software |
|
|
15 | (3) |
|
2.2 Configuring a Listener |
|
|
18 | (1) |
|
2.3 Creating an Oracle Database |
|
|
18 | (10) |
|
2.4 Installing Oracle 11g Client Software |
|
|
28 | (3) |
|
2.5 Oracle Grid Control versus DB Control |
|
|
31 | (2) |
|
|
|
33 | (1) |
|
|
|
33 | (1) |
|
|
|
33 | (1) |
|
3 Options for Accessing an Oracle Server |
|
|
34 | (18) |
|
3.1 A Command Line Interface (CLI) versus a GUI-Based Console |
|
|
35 | (2) |
|
3.2 The Oracle Enterprise Manager Java Console (OEMJC) |
|
|
37 | (3) |
|
3.3 Using the SQL*Plus Tool |
|
|
40 | (2) |
|
3.4 Oracle Enterprise Manager DBConsole |
|
|
42 | (1) |
|
3.5 Other Tools for Developers |
|
|
43 | (1) |
|
3.6 Case Study: Creating ER Diagrams with Visio via ODBC |
|
|
44 | (3) |
|
3.7 Case Study: Accessing Oracle in Java via JDBC |
|
|
47 | (2) |
|
|
|
49 | (1) |
|
|
|
50 | (1) |
|
|
|
50 | (2) |
|
4 A Quick Tour of an Oracle Server |
|
|
52 | (23) |
|
4.1 New Oracle Schemas Beyond "Scott" |
|
|
53 | (1) |
|
4.2 Oracle Users versus Schemas |
|
|
54 | (2) |
|
4.3 Tablespaces, Segments, Extents, and Data Blocks |
|
|
56 | (1) |
|
4.4 Tables, Indexes and Index Types for Structured Data |
|
|
57 | (8) |
|
4.5 Domain and LOB Index Types for Unstructured Data |
|
|
65 | (3) |
|
4.6 Views, Materialized Views, and Synonyms |
|
|
68 | (1) |
|
4.7 Stored Procedures, Functions, and Triggers |
|
|
68 | (3) |
|
4.8 Referential Integrity with Foreign Keys |
|
|
71 | (2) |
|
|
|
73 | (1) |
|
|
|
73 | (1) |
|
|
|
74 | (1) |
| Part 2 Oracle Architecture From Performance And Scalability Perspectives |
|
75 | (340) |
|
5 Understanding Oracle Architecture |
|
|
79 | (22) |
|
5.1 The Version History of Oracle |
|
|
80 | (2) |
|
|
|
82 | (5) |
|
|
|
87 | (2) |
|
5.4 Dedicated versus Shared Oracle Server Architecture |
|
|
89 | (2) |
|
5.5 Performance Sensitive Initialization Parameters |
|
|
91 | (3) |
|
5.6 Oracle Static Data Dictionary Views |
|
|
94 | (1) |
|
5.7 Oracle Dynamic Performance (V$) Views |
|
|
95 | (3) |
|
|
|
98 | (1) |
|
|
|
98 | (1) |
|
|
|
99 | (2) |
|
6 Oracle 10g Memory Management |
|
|
101 | (10) |
|
|
|
102 | (2) |
|
6.2 SGA Sizing: Automatic Shared Memory Management (ASMM) |
|
|
104 | (2) |
|
6.3 PGA Sizing: PGA_AGGREGATE_TARGET |
|
|
106 | (2) |
|
|
|
108 | (1) |
|
|
|
109 | (1) |
|
|
|
110 | (1) |
|
7 Oracle 11g Memory Management |
|
|
111 | (5) |
|
7.1 Automatic Memory Management (AMM) |
|
|
112 | (1) |
|
7.2 Memory Sizing Options Configurable at Database Creation Time |
|
|
112 | (1) |
|
7.3 Checking Memory Management and Usage Distribution at Run Time |
|
|
113 | (2) |
|
|
|
115 | (1) |
|
|
|
115 | (1) |
|
|
|
115 | (1) |
|
8 Oracle Storage Structure |
|
|
116 | (11) |
|
|
|
117 | (2) |
|
|
|
119 | (3) |
|
|
|
122 | (2) |
|
|
|
124 | (1) |
|
|
|
125 | (1) |
|
|
|
125 | (1) |
|
|
|
126 | (1) |
|
9 Oracle Wait Interface (OWI) |
|
|
127 | (12) |
|
9.1 Ratio-based versus OWI-based Oracle Performance Tuning Methodologies |
|
|
128 | (2) |
|
9.2 Wait Event-The Core Concept of OWI |
|
|
130 | (1) |
|
9.3 Classification of Wait Events from OWI |
|
|
131 | (3) |
|
9.4 The Other Part (CPU Time) of the Equation Elapsed Time = CPU Time + Wait Time |
|
|
134 | (2) |
|
9.5 AWR as a Compass to Tuning Oracle Performance and Scalability |
|
|
136 | (1) |
|
|
|
137 | (1) |
|
|
|
137 | (1) |
|
|
|
138 | (1) |
|
10 Oracle Data Consistency and Concurrency |
|
|
139 | (22) |
|
10.1 Select...for Update Statement |
|
|
140 | (1) |
|
10.2 ACID Properties of Transactions |
|
|
141 | (2) |
|
10.3 Read Phenomena and Data Inconsistencies |
|
|
143 | (2) |
|
10.4 Oracle Isolation Levels |
|
|
145 | (1) |
|
10.5 Multi-Version Concurrency Control (MVCC) and Read Consistency |
|
|
145 | (1) |
|
|
|
146 | (3) |
|
10.7 Lock Escalations versus Conversions |
|
|
149 | (1) |
|
|
|
149 | (1) |
|
|
|
150 | (1) |
|
|
|
150 | (1) |
|
10.11 Taking Advantage of Oracle's Scalable Concurrency Model |
|
|
151 | (1) |
|
10.12 Case Study: A JDBC Example |
|
|
152 | (6) |
|
|
|
158 | (1) |
|
|
|
159 | (1) |
|
|
|
159 | (2) |
|
11 Anatomy of an Oracle Automatic Workload Repository (AWR) Report |
|
|
161 | (66) |
|
11.1 Importance of Performance Statistics |
|
|
162 | (3) |
|
|
|
165 | (1) |
|
|
|
166 | (5) |
|
|
|
166 | (1) |
|
|
|
167 | (2) |
|
11.3.3 Instance Efficiency Percentages (Target 100%) |
|
|
169 | (1) |
|
11.3.4 Shared Pool Statistics |
|
|
170 | (1) |
|
11.3.5 Top Five Timed Events |
|
|
170 | (1) |
|
|
|
171 | (1) |
|
11.5 Wait Events Statistics |
|
|
172 | (6) |
|
11.5.1 Time Model Statistics |
|
|
173 | (1) |
|
|
|
174 | (1) |
|
|
|
174 | (2) |
|
11.5.4 Background Wait Events |
|
|
176 | (1) |
|
11.5.5 Operating System Statistics |
|
|
176 | (1) |
|
11.5.6 Service Statistics |
|
|
177 | (1) |
|
11.5.7 Service Wait Class Stats |
|
|
178 | (1) |
|
|
|
178 | (7) |
|
11.6.1 SQL ordered by Elapsed Time |
|
|
179 | (1) |
|
11.6.2 SQL ordered by CPU Time |
|
|
180 | (1) |
|
11.6.3 SQL ordered by Gets |
|
|
180 | (1) |
|
11.6.4 SQL ordered by Reads |
|
|
181 | (1) |
|
11.6.5 SQL ordered by Executions |
|
|
182 | (1) |
|
11.6.6 SQL ordered by Parse Calls |
|
|
183 | (1) |
|
11.6.7 SQL ordered by Sharable Memory |
|
|
183 | (1) |
|
11.6.8 SQL ordered by Version Count |
|
|
183 | (1) |
|
11.6.9 Complete List of SQL Text |
|
|
184 | (1) |
|
11.7 Instance Activity Statistics |
|
|
185 | (12) |
|
11.7.1 Instance Activity Stats |
|
|
185 | (11) |
|
11.7.2 Instance Activity Stats-Absolute Values |
|
|
196 | (1) |
|
11.7.3 Instance Activity Stats-Thread Activity |
|
|
197 | (1) |
|
|
|
197 | (2) |
|
11.8.1 Tablespace IO Stats |
|
|
198 | (1) |
|
|
|
198 | (1) |
|
11.9 Buffer Pool Statistics |
|
|
199 | (1) |
|
11.10 Advisory Statistics |
|
|
199 | (7) |
|
11.10.1 Instance Recovery Stats |
|
|
200 | (1) |
|
11.10.2 Buffer Pool Advisory |
|
|
200 | (1) |
|
|
|
201 | (1) |
|
11.10.4 PGA Aggr Target Stats |
|
|
202 | (1) |
|
11.10.5 PGA Aggr Target Histogram |
|
|
202 | (1) |
|
11.10.6 PGA Memory Advisory |
|
|
203 | (1) |
|
11.10.7 Shared Pool Advisory |
|
|
204 | (1) |
|
11.10.8 SGA Target Advisory |
|
|
204 | (1) |
|
11.10.9 Streams Pool Advisory |
|
|
205 | (1) |
|
11.10.10 Java Pool Advisory |
|
|
205 | (1) |
|
|
|
206 | (1) |
|
|
|
207 | (1) |
|
|
|
208 | (7) |
|
|
|
208 | (5) |
|
11.13.2 Latch Sleep Breakdown |
|
|
213 | (1) |
|
11.13.3 Latch Miss Sources |
|
|
214 | (1) |
|
11.13.4 Parent and Child Latch Statistics |
|
|
215 | (1) |
|
|
|
215 | (3) |
|
11.14.1 Segments by Logical Reads |
|
|
215 | (1) |
|
11.14.2 Segments by Physical Reads |
|
|
216 | (1) |
|
11.14.3 Segments by Row Lock Waits |
|
|
217 | (1) |
|
11.14.4 Segments by ITL Waits |
|
|
217 | (1) |
|
11.14.5 Segments by Buffer Busy Waits |
|
|
217 | (1) |
|
11.15 Dictionary Cache Stats |
|
|
218 | (1) |
|
11.16 Library Cache Activity |
|
|
219 | (1) |
|
|
|
219 | (3) |
|
11.17.1 Process Memory Summary |
|
|
219 | (1) |
|
11.17.2 SGA Memory Summary |
|
|
220 | (1) |
|
11.17.3 SGA Breakdown Difference |
|
|
221 | (1) |
|
|
|
222 | (2) |
|
11.19 Resource Limit Stats |
|
|
224 | (1) |
|
11.20 init.ora Parameters |
|
|
224 | (1) |
|
|
|
225 | (1) |
|
|
|
225 | (1) |
|
|
|
226 | (1) |
|
12 Oracle Advanced Features and Options |
|
|
227 | (30) |
|
12.1 Oracle 8i New Features |
|
|
227 | (6) |
|
|
|
228 | (1) |
|
12.1.2 Oracle interMedia, Spatial, Time Series, and Visual Image Retrieval |
|
|
229 | (1) |
|
12.1.3 Oracle Parallel Server |
|
|
230 | (1) |
|
12.1.4 Optimizer Plan Stability |
|
|
230 | (1) |
|
12.1.5 Locally Managed Tablespaces |
|
|
230 | (1) |
|
12.1.6 Online Index Creation and Rebuild |
|
|
231 | (1) |
|
12.1.7 Online Read-Only Tablespaces |
|
|
231 | (1) |
|
|
|
231 | (1) |
|
12.1.9 Non-Blocking OCI (Oracle Call Interface) |
|
|
231 | (1) |
|
12.1.10 Function-Based Indexes |
|
|
232 | (1) |
|
|
|
232 | (1) |
|
12.1.12 Enhanced Partitioning |
|
|
232 | (1) |
|
12.1.13 Connection Load Balancing |
|
|
233 | (1) |
|
12.1.14 Client Load Balancing |
|
|
233 | (1) |
|
12.1.15 Oracle Enterprise Manager |
|
|
233 | (1) |
|
12.2 Oracle 9i New Features |
|
|
233 | (8) |
|
12.2.1 Real Application Clusters (RAC) |
|
|
234 | (2) |
|
|
|
236 | (3) |
|
12.2.3 Performance Tuning Intelligent Advisors |
|
|
239 | (1) |
|
12.2.4 Actual Operation-Level Query Statistics |
|
|
239 | (1) |
|
12.2.5 Dynamic Sampling of Optimizer Statistics |
|
|
239 | (1) |
|
12.2.6 Cloning Production Database with Oracle Enterprise Manager |
|
|
240 | (1) |
|
12.2.7 Renaming Columns and Constraints |
|
|
241 | (1) |
|
12.2.8 Dynamic Memory Pools |
|
|
241 | (1) |
|
|
|
241 | (1) |
|
12.2.10 List Partitioning |
|
|
241 | (1) |
|
12.3 Oracle 10g New Features |
|
|
241 | (7) |
|
12.3.1 Automatic Storage Management (ASM) |
|
|
242 | (2) |
|
12.3.2 Asynchronous Commit |
|
|
244 | (1) |
|
|
|
244 | (1) |
|
12.3.4 Read Performance Statistics Directly from the SGA |
|
|
245 | (1) |
|
12.3.5 Automatic Workload Repository (AWR) |
|
|
245 | (1) |
|
12.3.6 Automatic Database Diagnostic Monitor (ADDM) |
|
|
245 | (1) |
|
12.3.7 Automatic Shared Memory Tuning |
|
|
245 | (1) |
|
12.3.8 Automatic Optimizer Statistics Gathering |
|
|
245 | (2) |
|
12.3.9 SQL Tuning Features |
|
|
247 | (1) |
|
|
|
247 | (1) |
|
12.4 Oracle 11g New Features |
|
|
248 | (7) |
|
12.4.1 Automatic Memory Management |
|
|
249 | (1) |
|
12.4.2 Intelligent Cursor Sharing |
|
|
249 | (1) |
|
12.4.3 Database Resident Connection Pool (DRCP) |
|
|
249 | (1) |
|
12.4.4 Server Result Cache |
|
|
250 | (1) |
|
12.4.5 Database Smart Flash Cache |
|
|
251 | (1) |
|
12.4.6 Database Replay SQL Performance Analyzer (SPA) Integration |
|
|
252 | (1) |
|
|
|
252 | (1) |
|
12.4.8 Partitioning Enhancements |
|
|
252 | (1) |
|
12.4.9 SQL Plan Management |
|
|
253 | (1) |
|
12.4.10 Zero-Size Unusable Indexes and Index Partitions |
|
|
254 | (1) |
|
12.4.11 Invisible Indexes |
|
|
254 | (1) |
|
|
|
254 | (1) |
|
|
|
255 | (1) |
|
|
|
255 | (1) |
|
|
|
255 | (2) |
|
13 Top 10 Oracle Performance and Scalability Features |
|
|
257 | (9) |
|
13.1 Real Application Clustering (RAC) |
|
|
258 | (2) |
|
13.2 Dedicated versus Shared Server Models |
|
|
260 | (1) |
|
13.3 Proven Transaction and Concurrency Models |
|
|
260 | (1) |
|
13.4 A Highly Efficient SQL Optimization Engine |
|
|
261 | (1) |
|
13.5 Efficient Parallel Processing with Modern Multi-Core CPUs |
|
|
261 | (1) |
|
|
|
262 | (1) |
|
13.7 An All-Encompassing, Powerful Performance, and Scalability Troubleshooting Tool-AWR |
|
|
262 | (1) |
|
13.8 The Most Comprehensive Set of Internal Performance Metrics |
|
|
263 | (1) |
|
13.9 Database Resident Connection Pool |
|
|
263 | (1) |
|
13.10 In-Memory Database Cache (IMDB) |
|
|
263 | (1) |
|
|
|
263 | (1) |
|
|
|
264 | (1) |
|
|
|
264 | (2) |
|
14 Oracle-Based Application Performance and Scalability by Design |
|
|
266 | (60) |
|
14.1 Rapid Development Methodologies |
|
|
268 | (1) |
|
|
|
269 | (3) |
|
|
|
269 | (1) |
|
|
|
270 | (1) |
|
|
|
270 | (1) |
|
|
|
271 | (1) |
|
14.2.5 Project Team Formation |
|
|
271 | (1) |
|
14.3 Requirements Gathering |
|
|
272 | (3) |
|
|
|
273 | (1) |
|
|
|
274 | (1) |
|
14.3.3 Business Processes, Entities, and Business Rules |
|
|
274 | (1) |
|
14.4 Conceptual Design via Data Modeling |
|
|
275 | (5) |
|
14.4.1 Entity-Relationship Diagramming |
|
|
276 | (2) |
|
14.4.2 The Information Engineering (IE) Format for ERDs |
|
|
278 | (1) |
|
14.4.3 UML Format for ERDs |
|
|
279 | (1) |
|
14.4.4 Relational Format for ERDs |
|
|
279 | (1) |
|
14.5 Logical Design via Normalization |
|
|
280 | (15) |
|
14.5.1 Operational Anomalies |
|
|
281 | (1) |
|
14.5.2 Review of Relation Theory |
|
|
282 | (3) |
|
14.5.3 Functional Dependencies and Lossless-Join Decompositions |
|
|
285 | (2) |
|
14.5.4 First Normal Form (1NF): Avoiding Multi-Valued Columns |
|
|
287 | (1) |
|
14.5.5 Second Normal Form (2NF): Eliminating Partial Dependencies |
|
|
288 | (1) |
|
14.5.6 Third Normal Form (3NF): Eliminating Transitive Dependencies: |
|
|
288 | (1) |
|
14.5.7 Boyce-Codd Normal Form (BCNF): Eliminating Key-Non-Key Dependencies |
|
|
289 | (1) |
|
14.5.8 Fourth Normal Form (4NF): Trivializing or Keying Multi-Valued Dependencies |
|
|
290 | (2) |
|
14.5.9 Fifth Normal Form (5NF): Trivializing or Keying Join Dependencies |
|
|
292 | (2) |
|
14.5.10 Which Level of Normalization to Settle Down? |
|
|
294 | (1) |
|
|
|
294 | (1) |
|
|
|
295 | (20) |
|
14.6.1 Naming Conventions |
|
|
297 | (1) |
|
14.6.2 Creating Tablespaces |
|
|
298 | (1) |
|
14.6.3 Creating a Schema User with Proper Privileges |
|
|
299 | (1) |
|
14.6.4 Creating Application Schema Objects |
|
|
299 | (9) |
|
14.6.5 Changing Schema Objects |
|
|
308 | (1) |
|
14.6.6 Enforcing Business Rules and Data Integrity |
|
|
309 | (3) |
|
|
|
312 | (1) |
|
14.6.8 Creating Sequences and Synonyms |
|
|
312 | (1) |
|
|
|
313 | (1) |
|
|
|
314 | (1) |
|
|
|
315 | (7) |
|
14.7.1 Choosing an Effective and Efficient Coding Path |
|
|
315 | (1) |
|
14.7.2 Leveraging Proven Oracle Database Design Principles |
|
|
316 | (2) |
|
14.7.3 Leveraging Proven Application Design Patterns |
|
|
318 | (1) |
|
14.7.4 Enforcing with an Effective and Efficient Testing Process |
|
|
319 | (3) |
|
14.8 Release To Market (RTM) |
|
|
322 | (1) |
|
14.9 Continuous Improvements |
|
|
322 | (1) |
|
|
|
323 | (1) |
|
|
|
324 | (1) |
|
|
|
325 | (1) |
|
15 Project: Soba-A Secure Online Banking Application on Oracle |
|
|
326 | (89) |
|
15.1 Getting SOBA Up and Running |
|
|
328 | (5) |
|
15.1.1 Prerequisite Software |
|
|
328 | (1) |
|
15.1.2 Initial Software Stack Setup |
|
|
329 | (1) |
|
15.1.3 Creating SOBA Database on Oracle |
|
|
330 | (1) |
|
15.1.4 Installing SOBA on Eclipse IDE |
|
|
330 | (1) |
|
15.1.5 Configuring SOBA to Work with Oracle |
|
|
331 | (2) |
|
15.1.6 Configuring SOBA to Work with Hibernate |
|
|
333 | (1) |
|
15.1.7 Building SOBA and Deploying SOBA with Ant to Run on Tomcat |
|
|
333 | (1) |
|
15.2 Overview of Spring Framework |
|
|
333 | (4) |
|
|
|
333 | (1) |
|
15.2.2 Spring for Building Flexible Applications Faster |
|
|
334 | (1) |
|
15.2.3 Spring Inversion of Control (IoC) and Dependency Injection |
|
|
335 | (1) |
|
15.2.4 Features of Spring 3.0 |
|
|
336 | (1) |
|
|
|
337 | (5) |
|
15.3.1 MVC Architecture in General |
|
|
338 | (2) |
|
15.3.2 Spring MVC in Action with SOBA |
|
|
340 | (2) |
|
15.4 Spring MVC Framework Applied to SOBA |
|
|
342 | (26) |
|
15.4.1 Spring DispatcherServlet and WebApplicationContext |
|
|
343 | (4) |
|
15.4.2 Logic Flow of SOBA Defined in Spring MVC Framework |
|
|
347 | (1) |
|
15.4.3 A Web Entry Point Defined in a Spring MVC Web Form |
|
|
348 | (2) |
|
|
|
350 | (3) |
|
15.4.5 Implementing Spring Controllers |
|
|
353 | (5) |
|
15.4.6 A Typical View Defined in a Spring MVC Web Form |
|
|
358 | (4) |
|
15.4.7 A Typical Form Success Controller and its Resultant View |
|
|
362 | (2) |
|
15.4.8 POJOs Referenced in the CreateCustomerFormController |
|
|
364 | (4) |
|
15.5 Hibernate Object-Relational Mapping (ORM) Applied to SOBA |
|
|
368 | (8) |
|
15.5.1 Benefits of Using Hibernate |
|
|
369 | (1) |
|
15.5.2 Metadata Mapping with Hibernate |
|
|
370 | (1) |
|
15.5.3 Configuring Hibernate to Work with Oracle |
|
|
371 | (2) |
|
|
|
373 | (3) |
|
15.6 RESTful Web Services Applied to SOBA |
|
|
376 | (10) |
|
15.6.1 Introduction to RESTful Web Services |
|
|
376 | (1) |
|
15.6.2 RESTful Constraints |
|
|
377 | (1) |
|
15.6.3 RESTful Interface Design Principles |
|
|
378 | (1) |
|
15.6.4 Spring's Support for RESTful Web Services |
|
|
379 | (1) |
|
|
|
380 | (3) |
|
|
|
383 | (3) |
|
15.7 Spring Security Applied to SOBA |
|
|
386 | (8) |
|
|
|
387 | (1) |
|
15.7.2 Security Configured in web.xml |
|
|
387 | (1) |
|
15.7.3 Security Configured in soba-security.xml |
|
|
388 | (6) |
|
15.7.4 Implementing Spring Security in Views |
|
|
394 | (1) |
|
15.8 Spring ACL Applied to SOBA |
|
|
394 | (19) |
|
15.8.1 Creating ACL Tables in Oracle |
|
|
395 | (1) |
|
15.8.2 Configuring Spring ACL |
|
|
395 | (3) |
|
15.8.3 Maintaining ACLs for SOBA Domain Objects |
|
|
398 | (6) |
|
15.8.4 Applying ACLs to Business Operations |
|
|
404 | (2) |
|
15.8.5 Testing ACLs with SOBA |
|
|
406 | (7) |
|
|
|
413 | (1) |
|
|
|
414 | (1) |
|
|
|
414 | (1) |
| Part 3 Optimizing Oracle Performance And Scalability |
|
415 | (58) |
|
16 Logistics of the Oracle Cost-Based Optimizer (CBO) |
|
|
417 | (14) |
|
16.1 Life of a SQL Statement in Oracle |
|
|
418 | (2) |
|
16.2 Oracle SQL Optimizer: Rule-Based versus Cost-Based |
|
|
420 | (1) |
|
|
|
421 | (1) |
|
16.4 Pivot Role of Gathering Database Statistics to CBO |
|
|
422 | (2) |
|
16.5 Methods of Gathering CBO Statistics |
|
|
424 | (1) |
|
16.6 Locking and Unlocking CBO Statistics |
|
|
425 | (1) |
|
16.7 Explain Plan-A Handle to CBO |
|
|
425 | (1) |
|
16.8 Data Access Methods-CBO's Footprints |
|
|
426 | (1) |
|
16.9 Looking Up CBO's Plan Hidden in V$SQL_PLAN |
|
|
427 | (1) |
|
16.10 When CBO may Generate Suboptimum Execution Plans |
|
|
428 | (1) |
|
|
|
429 | (1) |
|
|
|
429 | (1) |
|
|
|
430 | (1) |
|
|
|
431 | (18) |
|
|
|
432 | (5) |
|
|
|
437 | (2) |
|
17.3 Case Study: Performance of SUBQUERY versus JOIN |
|
|
439 | (4) |
|
17.4 Case Study: Performance of IN versus EXISTS |
|
|
443 | (1) |
|
17.5 Case Study: A SQL Tuning Yielded a 12x Performance Gain |
|
|
444 | (3) |
|
|
|
447 | (1) |
|
|
|
447 | (1) |
|
|
|
448 | (1) |
|
|
|
449 | (10) |
|
18.1 Rules of Thumb on Indexing |
|
|
450 | (1) |
|
18.2 Creating and Using Ubiquitous b-Tree Indexes |
|
|
451 | (1) |
|
18.3 Advanced Indexing Scheme I: Covering Indexes versus Index-Organized Tables |
|
|
452 | (1) |
|
18.4 Advanced Indexing Scheme II: Function-Based Indexes (FBIs) |
|
|
453 | (1) |
|
18.5 Unusual Indexing Scheme I: BITMAP Indexes |
|
|
454 | (1) |
|
18.6 Unusual Indexing Scheme II: Reverse Key Indexes |
|
|
455 | (1) |
|
18.7 Unusual Indexing Scheme III: Compressed Composite Indexes |
|
|
455 | (1) |
|
18.8 How To Create Oracle Indexes |
|
|
456 | (1) |
|
|
|
457 | (1) |
|
|
|
458 | (1) |
|
|
|
458 | (1) |
|
|
|
459 | (14) |
|
19.1 Oracle Automatic Database Diagnostic Monitor (ADDM) |
|
|
460 | (2) |
|
19.2 Automatic Undo Management |
|
|
462 | (1) |
|
19.3 Data Recovery Advisor |
|
|
462 | (1) |
|
|
|
462 | (4) |
|
|
|
466 | (1) |
|
|
|
466 | (1) |
|
|
|
467 | (2) |
|
19.8 SQL Performance Analyzer |
|
|
469 | (1) |
|
|
|
470 | (1) |
|
|
|
471 | (1) |
|
|
|
471 | (2) |
| Part 4 Case Studies: Oracle Meeting Real World Performance And Scalability Challenges |
|
473 | (160) |
|
20 Case Study: Achieving High Throughput with Array Processing |
|
|
477 | (8) |
|
|
|
478 | (1) |
|
|
|
479 | (1) |
|
|
|
480 | (1) |
|
|
|
480 | (2) |
|
20.5 Effects of Array Processing |
|
|
482 | (2) |
|
|
|
484 | (1) |
|
|
|
484 | (1) |
|
|
|
484 | (1) |
|
21 Case Study: Performance Comparison of Heap-Organized versus Index-Organized Tables |
|
|
485 | (7) |
|
|
|
486 | (1) |
|
21.2 Conversion from Heap-Organized to Index-Organized |
|
|
487 | (1) |
|
|
|
487 | (1) |
|
21.4 Creating Constraints |
|
|
488 | (1) |
|
|
|
488 | (1) |
|
|
|
489 | (1) |
|
|
|
490 | (1) |
|
|
|
491 | (1) |
|
|
|
491 | (1) |
|
22 Case Study: SQL Tuning: "IN" versus "OR" versus Global Temporary Table |
|
|
492 | (12) |
|
|
|
493 | (1) |
|
|
|
494 | (1) |
|
22.3 Observation 1: IN_CreateStatement is the Best Performer |
|
|
495 | (2) |
|
22.4 Observation 2: Batch Insert Saves Time |
|
|
497 | (1) |
|
22.5 Temptable Performed Better without an Index Hint than with an Index Hint |
|
|
498 | (1) |
|
22.6 Effects of APPEND Hint for Populating Temptable |
|
|
499 | (1) |
|
22.7 Effects of Number of Iterations |
|
|
499 | (1) |
|
22.8 OR and IN without the Index Hint |
|
|
499 | (2) |
|
22.9 Limitation on the Number of Literal Values and the Size of OR Statement |
|
|
501 | (1) |
|
22.10 Dealing with More Than 1000 Literal Values for an IN Based SQL Query |
|
|
501 | (1) |
|
22.11 A Recommendation for Dealing with 1000 Literal Value Limit in an IN Statement |
|
|
501 | (1) |
|
|
|
502 | (1) |
|
|
|
503 | (1) |
|
|
|
503 | (1) |
|
23 Case Study: Data Access Paths (Double Buffering) |
|
|
504 | (27) |
|
23.1 Data Access Paths in General |
|
|
505 | (6) |
|
|
|
507 | (2) |
|
|
|
509 | (1) |
|
|
|
510 | (1) |
|
|
|
511 | (3) |
|
23.2.1 Solaris on Veritas |
|
|
511 | (1) |
|
|
|
511 | (1) |
|
|
|
512 | (2) |
|
23.3 Test Results with Solaris on Veritas |
|
|
514 | (8) |
|
23.3.1 Test Run #1-145 ms Average Read Time |
|
|
514 | (2) |
|
23.3.2 Test Run #2-401 ms Average Read Time |
|
|
516 | (2) |
|
23.3.3 Test Run #3-261 ms Average Read Time |
|
|
518 | (1) |
|
23.3.4 Test Run #4-0.98 ms Average Read Time |
|
|
519 | (2) |
|
|
|
521 | (1) |
|
23.4 Test Results with Solaris on UFS |
|
|
522 | (4) |
|
23.4.1 Test Run #1-447 ms Average Read Time |
|
|
522 | (2) |
|
23.4.2 Test Run #2-10ms Average Read Time |
|
|
524 | (1) |
|
|
|
525 | (1) |
|
23.5 Test Results with Windows on NTFS |
|
|
526 | (2) |
|
23.5.1 Test Run-8 ms Average Read Time |
|
|
526 | (2) |
|
|
|
528 | (1) |
|
23.6 Moral of the Case Study |
|
|
528 | (1) |
|
|
|
529 | (1) |
|
|
|
530 | (1) |
|
24 Case Study: Covering Index |
|
|
531 | (16) |
|
24.1 Getting to Know the Application Architecture |
|
|
533 | (1) |
|
24.2 Quantifying the Problems |
|
|
533 | (1) |
|
24.3 Analyzing Bottlenecks |
|
|
533 | (2) |
|
24.4 Applying Optimizations Tunings |
|
|
535 | (1) |
|
|
|
535 | (10) |
|
|
|
537 | (1) |
|
24.5.2 Wait Events Statistics |
|
|
538 | (3) |
|
|
|
541 | (3) |
|
|
|
544 | (1) |
|
24.5.5 Buffer Pool Statistics |
|
|
544 | (1) |
|
|
|
544 | (1) |
|
24.5.7 init.ora Parameters |
|
|
545 | (1) |
|
24.6 Moral of the Case Study |
|
|
545 | (1) |
|
|
|
546 | (1) |
|
|
|
546 | (1) |
|
25 Case Study: CURSOR_SHARING |
|
|
547 | (24) |
|
25.1 The Concept of a Bind Variable |
|
|
548 | (1) |
|
25.2 Oracle CURSOR_SHARING Parameter |
|
|
549 | (1) |
|
25.3 Getting to Know the Application Architecture |
|
|
550 | (1) |
|
25.4 Quantifying Problems |
|
|
550 | (1) |
|
25.5 Analyzing Bottlenecks |
|
|
551 | (9) |
|
|
|
552 | (4) |
|
|
|
556 | (1) |
|
|
|
557 | (1) |
|
|
|
558 | (1) |
|
25.5.5 init.ora Parameters |
|
|
558 | (2) |
|
25.6 Applying Tuning: CURSOR_SHARING = FORCE |
|
|
560 | (4) |
|
|
|
561 | (2) |
|
25.6.2 Wait Events Statistics |
|
|
563 | (1) |
|
25.7 Applying Tuning: CURSOR_SHARING = SIMILAR |
|
|
564 | (5) |
|
|
|
564 | (2) |
|
25.7.2 Wait Events Statistics |
|
|
566 | (3) |
|
25.8 Moral of the Case Study |
|
|
569 | (1) |
|
|
|
569 | (1) |
|
|
|
570 | (1) |
|
26 Case Study: Bulk Transactions |
|
|
571 | (23) |
|
26.1 Application Architecture |
|
|
572 | (1) |
|
26.2 Quantifying Problems |
|
|
572 | (1) |
|
26.3 Identifying Performance and Scalability Optimization Opportunities |
|
|
573 | (8) |
|
|
|
573 | (2) |
|
26.3.2 Wait Events Statistics |
|
|
575 | (2) |
|
|
|
577 | (2) |
|
|
|
579 | (2) |
|
26.4 Effects of Bulk Transactions on Performance |
|
|
581 | (11) |
|
|
|
581 | (2) |
|
26.4.2 Wait Events Statistics |
|
|
583 | (2) |
|
|
|
585 | (2) |
|
|
|
587 | (5) |
|
26.5 Moral of the Case Study |
|
|
592 | (1) |
|
|
|
593 | (1) |
|
|
|
593 | (1) |
|
27 Case Study: Missing Statistics |
|
|
594 | (26) |
|
27.1 Decaying Performance due to Missing Statistics |
|
|
595 | (2) |
|
27.2 First Run with no Statistics |
|
|
597 | (7) |
|
|
|
598 | (1) |
|
27.2.2 Wait Events Statistics |
|
|
599 | (2) |
|
|
|
601 | (1) |
|
|
|
602 | (1) |
|
|
|
602 | (1) |
|
27.2.6 init.ora Parameters |
|
|
603 | (1) |
|
27.3 Second Run with Missing Statistics |
|
|
604 | (7) |
|
|
|
605 | (1) |
|
27.3.2 Wait Events Statistics |
|
|
606 | (1) |
|
|
|
607 | (2) |
|
|
|
609 | (1) |
|
|
|
609 | (2) |
|
27.4 Third Run with Updated Statistics |
|
|
611 | (7) |
|
|
|
611 | (2) |
|
27.4.2 Wait Events Statistics |
|
|
613 | (1) |
|
27.4.3 Operating System Statistics |
|
|
614 | (1) |
|
|
|
614 | (2) |
|
|
|
616 | (2) |
|
27.5 Moral of the Case Study |
|
|
618 | (1) |
|
|
|
618 | (1) |
|
|
|
618 | (2) |
|
28 Case Study: Misconfigured SAN Storage |
|
|
620 | (13) |
|
28.1 Architecture of the Apple's Xserve RAID |
|
|
621 | (1) |
|
|
|
622 | (4) |
|
|
|
622 | (2) |
|
28.2.2 Wait Events Statistics |
|
|
624 | (1) |
|
|
|
625 | (1) |
|
28.2.4 init.ora Parameters |
|
|
625 | (1) |
|
28.3 Reconfiguring the RAID and Verifying |
|
|
626 | (3) |
|
|
|
626 | (2) |
|
28.3.2 Wait Events Statistics |
|
|
628 | (1) |
|
|
|
629 | (1) |
|
28.4 Moral of the Case Study |
|
|
629 | (1) |
|
|
|
630 | (1) |
|
|
|
630 | (3) |
| Appendix A Oracle Product Documentations |
|
633 | (3) |
|
A.1 Oracle Database Concepts |
|
|
633 | (1) |
|
A.2 Oracle Database Administrator's Guide |
|
|
633 | (1) |
|
A.3 Oracle Database Reference |
|
|
634 | (1) |
|
A.4 Oracle Database Performance Tuning Guide |
|
|
634 | (1) |
|
A.5 Oracle Database 2 Day + Performance Tuning Guide |
|
|
634 | (1) |
|
A.6 Oracle Database 2 Day DBA |
|
|
634 | (1) |
|
A.7 Oracle Database SQL Language Reference |
|
|
634 | (1) |
|
A.8 Oracle Database Sample Schemas |
|
|
635 | (1) |
|
A.9 Oracle Database PL/SQL Packages and Types Reference |
|
|
635 | (1) |
|
A.10 Oracle Database PL/SQL Language Reference |
|
|
635 | (1) |
|
A.11 Oracle Database JDBC Developer's Guide and References |
|
|
635 | (1) |
| Appendix B Using SQL*PLUS With Oracle |
|
636 | (12) |
|
|
|
636 | (1) |
|
B.2 SQL*Plus and tnsnames.ora File |
|
|
637 | (1) |
|
|
|
638 | (1) |
|
B.4 Common SQL*Plus Commands |
|
|
638 | (1) |
|
B.5 Using SQL*Plus to Execute SQL Statements |
|
|
639 | (1) |
|
B.6 Using SQL*Plus to Execute PL SQL Blocks |
|
|
640 | (1) |
|
B.7 Using SQL*Plus Autotrace to Obtain EXECUTION PLANs and Optimizer Statistics |
|
|
640 | (1) |
|
B.8 Using SQL*Plus Timing Command |
|
|
641 | (1) |
|
B.9 Exporting/Importing Oracle Databases with SQL*Plus |
|
|
642 | (1) |
|
B.10 Creating AWR Reports with SQL*Plus |
|
|
643 | (1) |
|
B.11 Checking Tablespace Usage with SQL*Plus |
|
|
644 | (2) |
|
B.12 Creating EM DBConsole with SQL*Plus |
|
|
646 | (2) |
| Appendix C A Complete List Of All Wait Events In Oracle 11g |
|
648 | (8) |
| Appendix D A Complete List Of All Metrics With The V$Statname View |
|
656 | (11) |
| Appendix E A Complete List Of All Statistics With The V$Sysstat View |
|
667 | (14) |
| Index |
|
681 | |