Oracle大师Thomas Kyte的好书.pdf

所需积分/C币:9 2013-12-09 20:24:39 4.75MB PDF
27
收藏 收藏
举报

Expert Oracle Database Architecture 英文版!
5300FM qxd 8/22/05 4: 35 PM Page i Expert Oracle Database Architecture: 9iand 10g Programming Techniques and solutions Copyright@ 2005 by Thomas Kyte All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher ISBN(pbk):1-59059-530-0 Printed and bound in the united states of america 987654321 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark Lead Editor: Tony Davis Technical Reviewer: Jonathan Lewis, Roderick Manalac, Michael Moller, Gabe romanescu Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore, Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser Associate Publisher: Grace Wong Project Manager: Sofia Marchant Copy Edit Manager: Nicole LeClerc Assistant Production Director: Kari Brooks-Copony Production editor: Katie stence Compositor: Dina Quan Proofreader: linda marousek Indexer: Broccoli Information Management Artist: Kinetic Publishing Services, LLC Interior Designer: Van Winkle Design Group Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc, 233 Spring Street, 6th Floor, NewYork,Ny10013.Phone1-800-springer,fax201-348-4505,e-mailorders-ny@springer-sbm.com,or visithttp://www.springeronline.com For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, Ca94710.Phone510-549-5930,fax510-549-5939,e-mailinfo@apress.comorvisithttp://www.apress.com The information in this book is distributed on an"as is"basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s)nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indi rectly by the information contained in this work Thesourcecodeforthisbookisavailabletoreadersathttp://www.apress.cominthesourcecodesection 5300FM qxd 8/22/05 4: 35 PM Page iii Contents Foreword About the author XIV about the technical reviewers Acknowledgments Introduction XVI Setting Up Your Environment CHAPTER 1 Developing Successful Oracle Applications My Approach The black BoX Approach How(and How Not) to Develop Database Applications 2499 Understanding Oracle Architecture Understanding Concurrency Control 15 Multi-Versioning Database Independence? “ How do|Make| t run Faster?” 026 The DBa-Developer Relationship Summary .47 CHAPTER 2 Architecture overview 49 Defining Database and Instance .50 The Sga and background Processes .,,,,,,.,55 Connecting to Oracle ,,,,,,,,,,.57 Dedicated server 57 Shared server Mechanics of Connecting over TCP/P Summa 5300FM qxd 8/22/05 4: 35 PM Page iv CONTENTS CHAPTER 3 Files Parameter Files What are parameters? 67 Legacy init. ora Parameter Files Server Parameter Files(SPFILes Parameter File Wrap-Up 78 Trace Files 78 Requested Trace Files 79 Trace Files Generated in Response to Internal errors......83 Trace File Wrap-Up Alert File Data files a Brief Review of File System Mechanisms The Storage Hierarchy in an Oracle Database Dictionary-Managed and Locally-Managed Tablespaces 94 Temp filo Control Files Redo Log File Online redo Log Archived Redo log ........................................101 Password files Change Tracking File 106 Flashback Log Files ..107 Flashback database 107 Flash Recovery Area 108 DMP Files(EXP/IMP Files) 108 Data Pump Files 110 Flat files 113 Summary .114 CHAPTER 4 Memory Structures 115 The process global area and user global area 115 Manual PGA Memory Management 116 Automatic PGA Memory management ....123 Choosing Between Manual and auto Memory Management..133 PGa and UGa Wrap-Up 135 The System global Area 135 Fixed Sga 139 Redo Buffer 140 5300FM axd 8/22/05 4: 35 PM Page v contents Block Buffer cache 141 Shared Pool ..,,,,,,,,,,,,,,,,,,,,,,,148 Large pool 150 Java pool 151 Streams pool Automatic SGA Memory Management........... 152 Summary .,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,154 CHAPTER 5 Oracle processes Server processes Dedicated server connections 156 Shared server connections Connections vs Sessions Dedicated server vs shared server 165 Dedicated/Shared Server Wrap-Up .169 Background Processes 1面面 ....170 Focused background Processes .......171 Utility Background Processes 178 Slave Processes 181 10 Slaves 181 Parallel Query Slaves 182 Summary 1“, ....,,,,..182 CHAPTER 6 Locking and Latching 183 What are locks ocKIng Issues 186 Lost Updates 186 Pessimistic Locking 187 Optimistic Locking 189 Optimistic or Pessimistic Locking Blocking 200 Deadlocks 203 Lock Escalation 208 ck Types 209 DML LoCks .,...209 DDL Locks .217 Latches 220 Manual locking and User-Defined Locks ....229 Summa .230 5300FM qxd 8/22/05 4: 35 PM Page vi CONTENTS CHAPTER 7 Concurrency and Multi-versioning What Are Concurrency Controls?..,.............231 Transaction Isolation Levels 232 READ UNCOMMITTED ..234 READ COMMITTED .....∴....235 REPEATABLE READ .237 SERIALIZABLE ..239 READ ONLY 241 Implications of Multi-Version read Consistency ....................242 A Common Data Warehousing Technique That Fails 242 An Explanation for Higher Than Expected 1/0 on Hot Tables. .. 244 Write consistency 246 Consistent reads and current reads .247 Seeing a Restart 249 Why is a restart important to Us? 252 Summary 253 ChAPTER 8 Transactions .255 Transaction Control statements 256 Atomicity 257 Statement-Level atomicity .257 Procedure-Level atomicity ..,,,,.259 Transaction-Level atomicity 262 Integrity Constraints and Transactions ..262 IMMEDIATE Constraints 26 DEFERRABLE Constraints and Cascading Updates 26 Bad transaction habits Committing in a Loop 266 Using Autocommit ....272 Distributed transactions .273 Autonomous transactions 275 How Autonomous transactions Work 275 When to use autonomous transactions 277 Summary ...281 5300FM qxd 8/22/05 4: 35 PM Page vii contents chaPTer 9 Redo and undo 283 What Is redo? 283 What Is Undo? 284 How Redo and Undo Work Together .....287 Example INSERT-UPDATE-DELETE Scenario .287 Commit and rollback Processing 291 What does a commit do? ..292 What does a rollbacK do? ....298 Investigating redo 300 Measuring Redo 300 Redo generation and BEFORE/AFTER Triggers Can I Turn Off Redo Log Generation? 308 Why Can't I Allocate a New Log? 313 Block cleanout 1面面 ..314 Log contention 317 Temporary Tables and Redo/ Undo 319 Investigating Undo 323 What generates the most and least undo? 323 ORA-01555: snapshot too old Err Summar 336 CHAPTER 10 Database tables 337 Types of Table 337 Terminology 339 Segment 339 Segment Space Management High-Water Mark .342 FREELISTS 344 PCTFREE and Pctused ....347 LOGGING and nologging .350 INITRANS and maXtrans ....351 Heap organized Tables Index Organized Tables 354 Index organized Tables Wrap-Up Index clustered tables Index clustered Tables Wrap-Up .378 Hash clustered tables 378 Hash Clustered Tables Wrap-Up ....387 Sorted hash clustered Tables 5300FM qxd 8/22/05 4: 35 PM Page vi CONTENTS Nested tables Nested Tables syntax Nested Table Storage 399 Nested Tables Wrap-Up Temporary Tables Temporary Tables Wrap-Up ......410 Object Tables 410 Object Tables Wrap-Up ..418 Summary ..418 CHAPTER 11 Indexes 421 An Overview of oracle Indexes 422 BTree Indexes ..423 Index Key compression 426 Reverse Key Indexes .429 Descending Indexes 面面 ,,,,,,,435 When should You Use a b*tree Index? 437 B*Trees Wrap-Up 447 Bitmap Indexes 448 When Should You Use a bitmap Index? 449 Bitmap Join Indexes 453 Bitmap Indexes Wrap-Up 455 Function-Based Indexes ...455 Important Implementation Details 455 A Simple Function-Based Index Example 456 Indexing Only Some of the Rows 464 Implementing Selective Uniqueness 466 Caveat on CASE .467 Caveat Regarding ORA-01743 468 Function-Based Indexes Wrap-Up Application Domain Inde 469 Frequently asked Questions and Myths about Indexes ....,471 Do Indexes work on views? 471 Do Nulls and Indexes Work Together? 471 Should Foreign Keys Be Indexed? 474 Why Isn't My Index Getting Used 475 Myth: Space Is Never Reused in an Index 482 Myth: Most Discriminating Elements Should Be first 485 summary 488 5300FM qxd 8/22/05 4: 35 PM Page ix contents CHAPTER 12 Datatypes 489 An Overview of Oracle datatypes................489 Character and binary string types NLS OVerview 492 Character Strings Binary Strings RAW Types ...502 Number Types 504 NUMBER Type Syntax and Usage 507 BINARY_ FLOAT/BINARY_ DOUBLE Type Syntax and Usage... 510 Non-Native Number Types 511 Performance considerations ..511 LONG Type 513 Restrictions on LONG and LoNG RAW Types 513 Coping with legacy long types ..,...515 DATE, TIMESTAMP, and INTERVAL Types 520 Formats DATE Type 522 TIMESTAMP Type.....................529 INTERVAL Type 537 LOB Types ..540 Internal lobs BFILES 553 ROWID/UROWID Types 555 Summary 556 CHAPTER 13 Partitioning ....,,557 Partitioning Overview 558 Increased Availability ..,,,,,,.558 Reduced administrative burden 560 Enhanced Statement Performance Table Partitioning Schemes 567 Range Partitioning 567 Hash Partitioning 570 List Partitioning 575 Composite Partitioning.................. 577 Row Movement 579 Table Partitioning Schemes Wrap-Up

...展开详情
试读 127P Oracle大师Thomas Kyte的好书.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
Oracle大师Thomas Kyte的好书.pdf 9积分/C币 立即下载
1/127
Oracle大师Thomas Kyte的好书.pdf第1页
Oracle大师Thomas Kyte的好书.pdf第2页
Oracle大师Thomas Kyte的好书.pdf第3页
Oracle大师Thomas Kyte的好书.pdf第4页
Oracle大师Thomas Kyte的好书.pdf第5页
Oracle大师Thomas Kyte的好书.pdf第6页
Oracle大师Thomas Kyte的好书.pdf第7页
Oracle大师Thomas Kyte的好书.pdf第8页
Oracle大师Thomas Kyte的好书.pdf第9页
Oracle大师Thomas Kyte的好书.pdf第10页
Oracle大师Thomas Kyte的好书.pdf第11页
Oracle大师Thomas Kyte的好书.pdf第12页
Oracle大师Thomas Kyte的好书.pdf第13页
Oracle大师Thomas Kyte的好书.pdf第14页
Oracle大师Thomas Kyte的好书.pdf第15页
Oracle大师Thomas Kyte的好书.pdf第16页
Oracle大师Thomas Kyte的好书.pdf第17页
Oracle大师Thomas Kyte的好书.pdf第18页
Oracle大师Thomas Kyte的好书.pdf第19页
Oracle大师Thomas Kyte的好书.pdf第20页

试读结束, 可继续阅读

9积分/C币 立即下载 >