Contents at a Glance |
|
v | |
Foreword |
|
xviii | |
Foreword from the First Edition |
|
xix | |
About the Author |
|
xxii | |
About the Technical Reviewers |
|
xxiii | |
Acknowledgments |
|
xxiv | |
Introduction |
|
xxv | |
Setting Up Your Environment |
|
xxxii | |
|
Chapter 1 Developing Successful Oracle Applications |
|
|
1 | (50) |
|
|
2 | (1) |
|
|
3 | (8) |
|
How (and How Not) to Develop Database Applications |
|
|
11 | (38) |
|
Understanding Oracle Architecture |
|
|
12 | (9) |
|
Understanding Concurrency Control |
|
|
21 | (4) |
|
|
25 | (7) |
|
|
32 | (14) |
|
How Do I Make It Run Faster? |
|
|
46 | (2) |
|
The DBA-Developer Relationship |
|
|
48 | (1) |
|
|
49 | (2) |
|
Chapter 2 Architecture Overview |
|
|
51 | (16) |
|
Defining Database and Instance |
|
|
52 | (8) |
|
The SGA and Background Processes |
|
|
58 | (2) |
|
|
60 | (6) |
|
|
60 | (2) |
|
|
62 | (1) |
|
Mechanics of Connecting over TCP/IP |
|
|
63 | (3) |
|
|
66 | (1) |
|
|
67 | (54) |
|
|
68 | (6) |
|
|
69 | (4) |
|
Legacy init.ora Parameter Files |
|
|
73 | (1) |
|
Server Parameter Files (SPFILEs) |
|
|
74 | (8) |
|
|
75 | (7) |
|
|
82 | (11) |
|
|
83 | (5) |
|
Trace Files Generated in Response to Internal Errors |
|
|
88 | (5) |
|
|
93 | (1) |
|
|
93 | (3) |
|
|
96 | (7) |
|
A Brief Review of File System Mechanisms |
|
|
96 | (1) |
|
The Storage Hierarchy in an Oracle Database |
|
|
97 | (4) |
|
Dictionary-Managed and Locally-Managed Tablespaces |
|
|
101 | (2) |
|
|
103 | (2) |
|
|
105 | (1) |
|
|
105 | (4) |
|
|
106 | (2) |
|
|
108 | (1) |
|
|
109 | (4) |
|
|
113 | (1) |
|
|
114 | (2) |
|
|
114 | (1) |
|
|
115 | (1) |
|
DMP Files (EXP/IMP Files) |
|
|
116 | (1) |
|
|
117 | (3) |
|
|
120 | (1) |
|
|
120 | (1) |
|
Chapter 4 Memory Structures |
|
|
121 | (44) |
|
The Process Global Area and User Global Area |
|
|
122 | (20) |
|
Manual PGA Memory Management |
|
|
123 | (6) |
|
Automatic PGA Memory Management |
|
|
129 | (11) |
|
Choosing Between Manual and Auto Memory Management |
|
|
140 | (2) |
|
|
142 | (1) |
|
|
142 | (22) |
|
|
148 | (1) |
|
|
148 | (1) |
|
|
149 | (7) |
|
|
156 | (3) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
Automatic SGA Memory Management |
|
|
161 | (1) |
|
Automatic Memory Management |
|
|
162 | (2) |
|
|
164 | (1) |
|
Chapter 5 Oracle Processes |
|
|
165 | (30) |
|
|
166 | (14) |
|
Dedicated Server Connections |
|
|
166 | (3) |
|
Shared Server Connections |
|
|
169 | (1) |
|
Database Resident Connection Pooling (DRCP) |
|
|
170 | (1) |
|
|
170 | (6) |
|
Dedicated Server vs Shared Server vs DRCP |
|
|
176 | (3) |
|
Dedicated/Shared Server Wrap-up |
|
|
179 | (1) |
|
|
180 | (13) |
|
Focused Background Processes |
|
|
181 | (9) |
|
Utility Background Processes |
|
|
190 | (3) |
|
|
193 | (1) |
|
|
193 | (1) |
|
Pnnn: Parallel Query Execution Servers |
|
|
193 | (1) |
|
|
194 | (1) |
|
Chapter 6 Locking and Latching |
|
|
195 | (48) |
|
|
195 | (3) |
|
|
198 | (18) |
|
|
198 | (1) |
|
|
199 | (2) |
|
|
201 | (6) |
|
Optimistic or Pessimistic Locking? |
|
|
207 | (1) |
|
|
208 | (3) |
|
|
211 | (4) |
|
|
215 | (1) |
|
|
216 | (25) |
|
|
216 | (9) |
|
|
225 | (5) |
|
|
230 | (10) |
|
|
240 | (1) |
|
Manual Locking and User-Defined Locks |
|
|
240 | (1) |
|
|
241 | (2) |
|
Chapter 7 Concurrency and Multi-versioning |
|
|
243 | (24) |
|
What Are Concurrency Controls? |
|
|
243 | (1) |
|
Transaction Isolation Levels |
|
|
244 | (11) |
|
|
246 | (2) |
|
|
248 | (1) |
|
|
249 | (3) |
|
|
252 | (2) |
|
|
254 | (1) |
|
Implications of Multi-version Read Consistency |
|
|
255 | (4) |
|
A Common Data Warehousing Technique That Fails |
|
|
255 | (1) |
|
An Explanation for Higher Than Expected I/O on Hot Tables |
|
|
256 | (3) |
|
|
259 | (6) |
|
Consistent Reads and Current Reads |
|
|
259 | (3) |
|
|
262 | (2) |
|
Why Is a Restart Important to Us? |
|
|
264 | (1) |
|
|
265 | (2) |
|
|
267 | (32) |
|
Transaction Control Statements |
|
|
267 | (2) |
|
|
269 | (6) |
|
Statement-Level Atomicity |
|
|
269 | (2) |
|
Procedure-Level Atomicity |
|
|
271 | (4) |
|
Transaction-Level Atomicity |
|
|
275 | (1) |
|
|
275 | (1) |
|
|
275 | (4) |
|
WRITE Extensions to COMMIT |
|
|
276 | (1) |
|
COMMITS in a Non-Distributed PL/SQL Block |
|
|
277 | (2) |
|
Integrity Constraints and Transactions |
|
|
279 | (5) |
|
|
279 | (1) |
|
Deferrable Constraints and Cascading Updates |
|
|
280 | (4) |
|
|
284 | (7) |
|
|
284 | (6) |
|
|
290 | (1) |
|
|
291 | (2) |
|
|
293 | (5) |
|
How Autonomous Transactions Work |
|
|
293 | (2) |
|
When to Use Autonomous Transactions |
|
|
295 | (3) |
|
|
298 | (1) |
|
|
299 | (46) |
|
|
300 | (1) |
|
|
300 | (4) |
|
How Redo and Undo Work Together |
|
|
304 | (4) |
|
Example INSERT-UPDATE-DELETE Scenario |
|
|
304 | (4) |
|
Commit and Rollback Processing |
|
|
308 | (8) |
|
|
308 | (7) |
|
|
315 | (1) |
|
|
316 | (16) |
|
|
316 | (2) |
|
Can I Turn Off Redo Log Generation? |
|
|
318 | (3) |
|
Why Can't I Allocate a New Log? |
|
|
321 | (2) |
|
|
323 | (3) |
|
|
326 | (2) |
|
Temporary Tables and Redo/Undo |
|
|
328 | (4) |
|
|
332 | (12) |
|
What Generates the Most and Least Undo? |
|
|
332 | (2) |
|
ORA-01555: snapshot too old Error |
|
|
334 | (10) |
|
|
344 | (1) |
|
Chapter 10 Database Tables |
|
|
345 | (80) |
|
|
345 | (2) |
|
|
347 | (12) |
|
|
347 | (3) |
|
|
350 | (1) |
|
|
350 | (2) |
|
|
352 | (4) |
|
|
356 | (3) |
|
|
359 | (1) |
|
|
359 | (1) |
|
|
359 | (4) |
|
|
363 | (15) |
|
Index Organized Tables Wrap-up |
|
|
378 | (1) |
|
|
378 | (8) |
|
Index Clustered Tables Wrap-up |
|
|
386 | (1) |
|
|
386 | (9) |
|
Hash Clustered Tables Wrap-up |
|
|
394 | (1) |
|
Sorted Hash Clustered Tables |
|
|
395 | (2) |
|
|
397 | (12) |
|
|
398 | (7) |
|
|
405 | (3) |
|
|
408 | (1) |
|
|
409 | (7) |
|
|
415 | (1) |
|
|
416 | (7) |
|
|
423 | (1) |
|
|
423 | (2) |
|
|
425 | (68) |
|
An Overview of Oracle Indexes |
|
|
425 | (2) |
|
|
427 | (25) |
|
|
430 | (3) |
|
|
433 | (6) |
|
|
439 | (2) |
|
When Should You Use a B Tree Index? |
|
|
441 | (11) |
|
|
452 | (1) |
|
|
452 | (8) |
|
When Should You Use a Bitmap Index? |
|
|
453 | (4) |
|
|
457 | (2) |
|
|
459 | (1) |
|
|
460 | (14) |
|
Important Implementation Details |
|
|
460 | (1) |
|
A Simple Function-Based Index Example |
|
|
461 | (9) |
|
Indexing Only Some of the Rows |
|
|
470 | (2) |
|
Implementing Selective Uniqueness |
|
|
472 | (1) |
|
Caveat Regarding ORA-01743 |
|
|
472 | (1) |
|
Function-Based Indexes Wrap-up |
|
|
473 | (1) |
|
Application Domain Indexes |
|
|
474 | (1) |
|
Frequently Asked Questions and Myths About Indexes |
|
|
475 | (16) |
|
Do Indexes Work on Views? |
|
|
475 | (1) |
|
Do Nulls and Indexes Work Together? |
|
|
475 | (2) |
|
Should Foreign Keys Be Indexed? |
|
|
477 | (2) |
|
Why Isn't My Index Getting Used? |
|
|
479 | (6) |
|
Myth: Space Is Never Reused in an Index |
|
|
485 | (3) |
|
Myth: Most Discriminating Elements Should Be First |
|
|
488 | (3) |
|
|
491 | (2) |
|
|
493 | (64) |
|
An Overview of Oracle Datatypes |
|
|
493 | (3) |
|
Character and Binary String Types |
|
|
496 | (10) |
|
|
496 | (3) |
|
|
499 | (7) |
|
Binary Strings: RAW Types |
|
|
506 | (2) |
|
|
508 | (8) |
|
Number Type Syntax and Usage |
|
|
510 | (3) |
|
Binary_Float/Binary_Double Type Syntax and Usage |
|
|
513 | (1) |
|
|
514 | (1) |
|
Performance Considerations |
|
|
514 | (2) |
|
|
516 | (7) |
|
Restrictions on LONG and LONG RAW Types |
|
|
516 | (2) |
|
Coping with Legacy LONG Types |
|
|
518 | (5) |
|
Dates, Timestamps, and Interval Types |
|
|
523 | (18) |
|
|
523 | (2) |
|
|
525 | (6) |
|
|
531 | (7) |
|
|
538 | (3) |
|
|
541 | (13) |
|
|
541 | (11) |
|
|
552 | (2) |
|
|
554 | (1) |
|
|
555 | (2) |
|
|
557 | (64) |
|
|
557 | (9) |
|
|
558 | (2) |
|
Reduced Administrative Burden |
|
|
560 | (4) |
|
Enhanced Statement Performance |
|
|
564 | (2) |
|
Table Partitioning Schemes |
|
|
566 | (25) |
|
|
567 | (2) |
|
|
569 | (5) |
|
|
574 | (1) |
|
|
575 | (6) |
|
|
581 | (5) |
|
|
586 | (2) |
|
|
588 | (2) |
|
Table Partitioning Schemes Wrap-up |
|
|
590 | (1) |
|
|
591 | (21) |
|
Local Indexes vs Global Indexes |
|
|
592 | (1) |
|
|
593 | (6) |
|
|
599 | (13) |
|
Partitioning and Performance, Revisited |
|
|
612 | (6) |
|
Auditing and Segment Space Compression |
|
|
618 | (1) |
|
|
619 | (2) |
|
Chapter 14 Parallel Execution |
|
|
621 | (36) |
|
When to Use Parallel Execution |
|
|
622 | (2) |
|
A Parallel Processing Analogy |
|
|
623 | (1) |
|
|
624 | (1) |
|
|
624 | (6) |
|
|
630 | (3) |
|
|
633 | (12) |
|
Parallel DDL and Data Loading Using External Tables |
|
|
634 | (2) |
|
Parallel DDL and Extent Trimming |
|
|
636 | (9) |
|
|
645 | (1) |
|
|
645 | (11) |
|
Parallel Pipelined Functions |
|
|
646 | (3) |
|
Do-it-Yourself Parallelism |
|
|
649 | (3) |
|
Old School Do-it-Yourself Parallelism |
|
|
652 | (4) |
|
|
656 | (1) |
|
Chapter 15 Data Loading and Unloading |
|
|
657 | (52) |
|
|
657 | (29) |
|
Loading Data with SQLLDR FAQs |
|
|
661 | (25) |
|
|
686 | (1) |
|
|
686 | (1) |
|
|
686 | (12) |
|
Setting Up External Tables |
|
|
687 | (6) |
|
|
693 | (3) |
|
Using an External Table to Load Different Files |
|
|
696 | (1) |
|
|
696 | (1) |
|
|
697 | (1) |
|
|
698 | (8) |
|
|
706 | (2) |
|
|
708 | (1) |
|
Chapter 16 Data Encryption |
|
|
709 | (42) |
|
|
709 | (13) |
|
|
709 | (1) |
|
|
710 | (3) |
|
Manual Application Encryption |
|
|
713 | (1) |
|
|
714 | (3) |
|
Transparent Column Level Encryption |
|
|
717 | (2) |
|
Transparent Tablespace Encryption |
|
|
719 | (3) |
|
What Encryption Is Not About |
|
|
722 | (1) |
|
Implementing Manual Application Encryption |
|
|
723 | (6) |
|
Reasons to Avoid the Manual Approach |
|
|
723 | (1) |
|
Performance Implications of the Manual Approach |
|
|
724 | (5) |
|
When to Use the Manual Approach |
|
|
729 | (1) |
|
Implementing Column Level Encryption |
|
|
729 | (12) |
|
How to Use Column Encryption |
|
|
729 | (1) |
|
Data Storage with Column Encryption |
|
|
730 | (4) |
|
Measuring the Performance Impact of Column Encryption |
|
|
734 | (1) |
|
Influences on the Magnitude |
|
|
734 | (6) |
|
Limitations of Column Encryption |
|
|
740 | (1) |
|
Implementing Tablespace Encryption |
|
|
741 | (7) |
|
How to Use Tablespace Encryption |
|
|
741 | (1) |
|
Data Storage with Tablespace Encryption |
|
|
741 | (2) |
|
Measuring the Performance Impact of Tablespace Encryption |
|
|
743 | (5) |
|
Deciding on an Encryption Technique |
|
|
748 | (1) |
|
|
749 | (2) |
Index |
|
751 | |