Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 729 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
729
Dung lượng
8,39 MB
Nội dung
www.it-ebooks.info
Oracle Database
Performance
and Scalability
www.it-ebooks.info
Quantitative Software Engineering Series
The Quantitative Engineering Series focuses on the convergence of systems engi-
neering with emphasis on quantitative engineering trade-off analysis. Each title
brings the principles and theory of programming in-the-large and industrial
strength software into focus.
This practical series helps software developers, software engineers, systems engi-
neers, and graduate students understand and benefit from this convergence through
the unique weaving of software engineering case histories, quantitative analysis,
and technology into the project effort. You will find each publication reinforces the
series goal of assisting the reader with producing useful, well-engineered software
systems.
Series Editor: Lawrence Bernstein
Professor Bernstein is currently an Industry Research Professor at the Stevens
Institute of Technology. He previously pursued a distinguished executive career at
Bell Laboratories. He is a fellow of the IEEE and ACM.
Trustworthy Systems for Quantitative Software Engineering / Larry Bernstein
and C.M. Yuhas
Software Measurement and Estimation: A Practical Approach / Linda M.
Laird and M. Carol Brennan
World Wide Web Application Engineering and Implementation / Steven A.
Gabarro
Software PerformanceandScalability / Henry H. Liu
Managing the Development of Software-Intensive Systems / James McDonald
Trustworthy Compilers / Vladimir O. Safonov
Oracle DatabasePerformanceand Scalability: A Quantitative Approach /
Henry H. Liu
Enterprise Software Architecture and Design: Entities, Services and
Resources / Dominic Duggan
quantitative software eng new cp_quantitative software eng cp.qxd 8/11/2011 12:06 PM Page 1
www.it-ebooks.info
Oracle Database
Performance
and Scalability
A Quantitative Approach
Henry H. Liu
www.it-ebooks.info
Copyright Ó 2012 by John Wiley & Sons, Inc. All rights reserved
Published by John Wiley & Sons, Inc., Hoboken, New Jersey
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by
any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted
under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400,
fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should
be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken,
NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts
in preparing this book, they make no representations or warranties with respect to the accuracy or
completeness of the contents of this book and specifically disclaim any implied warranties of
merchantability or fitness for a particular purpose. No warranty may be created or extended by sales
representatives or written sales materials. The advice and strategies contained herein may not be
suitable for your situation. You should consult with a professional where appropriate. Neither the
publisher nor author shall be liable for any loss of profit or any other commercial damages, including but
not limited to special, incidental, consequential, or other damages.
For general information on our other products and services or for technical support, please contact
our Customer Care Department within the United States at (800) 762-2974, outside the United States
at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
not be available in electronic formats. For more information about Wiley products, visit our web site at
www.wiley.com.
Library of Congress Cataloging-in-Publication Data:
Liu, Henry H.
Oracle databaseperformanceandscalability : a quantitative approach /Henry H. Liu.
p. cm.
ISBN 978-1-118-05699-8 (cloth)
1. Oracle (Computer file) 2. Database management. I. Title.
QA76.9.D3L5945 2012
005.75’65–dc23
2011017552
Printed in the United States of America
oBook ISBN: 978-1-118-13553-2
ePDF ISBN: 978-1-118-13549-5
ePub ISBN: 978-1-118-13551-8
eMobi ISBN: 978-1-118-13550-1
10987654321
www.it-ebooks.info
To My Family
www.it-ebooks.info
www.it-ebooks.info
Contents
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
ACKNOWLEDGMEN TS xxxiii
INTRODUCTION 1
Features of Oracle / 2
Objectives / 4
Conventions / 5
Performance versus Scalability / 6
PART 1 GETTING STAR TED WITH ORACLE 7
1 Basic Concepts 9
1.1 Standard versus Flavored SQLS / 10
1.2 Relational versus Object-Oriented Databases / 11
vii
www.it-ebooks.info
1.3 An Instance versus a Database / 11
1.4 Summary / 12
Recommended Reading / 12
Exercises / 12
2 Installing Oracle Software 14
2.1 Installing Oracle 11g Server So ftware / 15
2.2 Configuring a Listener / 18
2.3 Creating an OracleDatabase / 18
2.4 Installing Oracle 11g Client Software / 28
2.5 Oracle Grid Control versus DB Control / 31
2.6 Summary / 33
Recommended Reading / 33
Exercises / 33
3 Options for Accessing an Oracle Server 34
3.1 A Command Line Interface (CLI) versus
a GUI-Based Console / 35
3.2 The Oracle Enterprise Manager Java Console
(OEMJC) / 37
3.3 Using the SQL
Ã
Plus Tool / 40
3.4 Oracle Enterprise Mana ger DBConsole / 42
3.5 Other Tools for Developers / 43
3.6 Case Study: Creating ER Diagrams with Visio via
ODBC / 44
3.7 Case Study: Accessing Oracle in Java via JDBC / 47
3.8 Summary / 49
Recommended Reading / 50
Exercises / 50
4 A Quick Tour of an Oracle Server 52
4.1 New Oracle Schemas Beyond “Scott” / 53
4.2 Oracle Users versus Schemas / 54
4.3 Tablespaces, Segments, Extents, and Data Blocks / 56
4.4 Tables, Indexes and Index Types for Structured Data / 57
4.5 Domain and LOB Index Types for Unstructured Data / 65
4.6 Views, Materialized Views, and Synonyms / 68
4.7 Stored Procedures, Funct ions, and Triggers / 68
4.8 Referential Integrity with Foreign Keys / 71
4.9 Summary / 73
viii CONTENTS
www.it-ebooks.info
Recommended Reading / 73
Exercises / 74
PART 2 ORACLE ARCHITECTURE FROM PERFORMANCE
AND SCALABILITY PERSPECTIVES 75
5 Understanding Oracle Architecture 79
5.1 The Version History of Oracle / 80
5.2 Oracle Processes / 82
5.3 Oracle Memory Areas / 87
5.4 Dedicated versus Shared Oracle Server Architecture / 89
5.5 Performance Sensitive Initialization Parameters / 91
5.6 Oracle Static Data Dictionary Views / 94
5.7 Oracle Dynamic Perform ance (V$) Views / 95
5.8 Summary / 98
Recommended Reading / 98
Exercises / 99
6 Oracle 10g Memory Management 101
6.1 SGA Sub-Areas / 102
6.2 SGA Sizing: Automatic Shared Memory Managem ent
(ASMM) / 104
6.3 PGA Sizing: PGA_AGGREGATE_TARGET / 106
6.4 Summary / 108
Recommended Reading / 109
Exercises / 110
7 Oracle 11g Memory Management 111
7.1 Automatic Memory Management (AMM) / 112
7.2 Memory Sizing Options Configurable at Database
Creation Time / 112
7.3 Checking Memory Management and Usage Distribution
at Run Time / 113
7.4 Summary / 115
Recommended Reading / 115
Exercises / 115
8 Oracle Storage Structure 116
8.1 Overview / 117
8.2 Managing Tablespaces / 119
CONTENTS ix
www.it-ebooks.info
[...]... PREFACE T Oracle wait interface (OWI) T Oracle data consistency and concurrency T Oracle automatic workload repository (AWR) T Oracle advanced features and options T Top 10 Oracleperformanceandscalability features T Oracle- based application performanceandscalability by design T Project: SOBA—A Secure Online Banking Application on Oracle Part 3, “Optimizing OraclePerformanceand Scalability, ”... Tuning Guide / 634 OracleDatabase 2 Day þ Performance Tuning Guide / 634 OracleDatabase 2 Day DBA / 634 OracleDatabase SQL Language Reference / 634 OracleDatabase Sample Schemas / 635 OracleDatabase PL/SQL Packages and Types Reference / 635 OracleDatabase PL/SQL Language Reference / 635 OracleDatabase JDBC Developer’s Guide and References / 635 APPENDIX B USING SQLÃ PLUS WITH ORACLE B.1 Installation... Scalability, ” teaches all about how to optimize and tune Oracleperformanceandscalability The following subjects are selected: T Oracle cost-based optimizer (CBO) T Oracle SQL tuning T Oracle indexing T Oracle auto-tune features Part 4, “Case Studies: Oracle Meeting Real World PerformanceandScalability Challenges,” provides quantitative case studies out of my own first-hand, real product based experiences to... learning how to install and set it up This would serve as an effective stepping stone to learning more advanced concepts and features Part 2, Oracle Architecture from PerformanceandScalability Perspectives,” covers all major database concepts and architectural features related to optimizing Oracleperformanceandscalability The following subjects are covered: T overall Oracle architecture T memory... experiences to demonstrate how one can achieve high performanceandscalability by applying various Oracleperformanceandscalability best practices It sets a high standard on teaching Oracle performance andscalability by using quantitative, real world case studies rather than oversimplified, classroom-setting oriented, Scottish examples Students and enterprise software professionals will be equipped... Oracledatabase server, Oracle application server, and so on For convenience, however, in this text, we use the term Oracle server (or simply Oracle) to mean Oracledatabase server implicitly, without always carrying the term database or database server explicitly when it’s contextually obvious The Oracledatabase management system (DBMS) is one of the earliest, most widely used, and most robust database. .. following considerations: practicality-based selection of all basic database concepts and architectural features designed specifically with Oracle from performance andscalability perspectives, precise step-by-step instructions about how to perform various Oracle specific tasks in the context of optimizing and tuning Oracle performance andscalability as convenient timesavers for all audiences, a full-scale... the performance andscalability of real products In addition to the main text, a few appendices are provided at the end of the book as handy references for performing various routine tasks in dealing with Oracleperformanceandscalability challenges SOFTWARE AND HARDWARE To help make the most of this text, a hands-on approach is recommended One can have an Oracle setting with the latest version of Oracle. .. how-to text for full-time Oracle DBAs, although the Oracle performance andscalability troubleshooting methodologies and those quantitative case studies based on real products and customer engagements might be useful for such a group of Oracle professionals For the same reason, I only cover those administrative tasks that are necessary for carrying out Oracleperformanceandscalability work in a broad... leverage the performanceandscalability features engineered into Oracle to achieve the end result www.it-ebooks.info PREFACE xxvii of meeting performanceandscalability requirements with their products as demanded by their customers This book has the right style and context both for college professors who teach database concepts and for enterprise software professionals who develop Oraclebased enterprise . Safonov
Oracle Database Performance and Scalability: A Quantitative Approach /
Henry H. Liu
Enterprise Software Architecture and Design: Entities, Services and
Resources. 74
PART 2 ORACLE ARCHITECTURE FROM PERFORMANCE
AND SCALABILITY PERSPECTIVES 75
5 Understanding Oracle Architecture 79
5.1 The Version History of Oracle /