100% found this document useful (1 vote)
13 views

Oracle Database Performance and Scalability A Quantitative Approach 1st Edition Henry H. Liu instant download

The document provides information about the book 'Oracle Database Performance and Scalability: A Quantitative Approach' by Henry H. Liu, which is part of the Quantitative Software Engineering Series. It covers various aspects of Oracle database performance, including architecture, memory management, and performance tuning methodologies. Additionally, it includes links to other related publications and resources for further reading.

Uploaded by

nemenuloaku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
13 views

Oracle Database Performance and Scalability A Quantitative Approach 1st Edition Henry H. Liu instant download

The document provides information about the book 'Oracle Database Performance and Scalability: A Quantitative Approach' by Henry H. Liu, which is part of the Quantitative Software Engineering Series. It covers various aspects of Oracle database performance, including architecture, memory management, and performance tuning methodologies. Additionally, it includes links to other related publications and resources for further reading.

Uploaded by

nemenuloaku
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Oracle Database Performance and Scalability A

Quantitative Approach 1st Edition Henry H. Liu


pdf download

https://ebookname.com/product/oracle-database-performance-and-
scalability-a-quantitative-approach-1st-edition-henry-h-liu/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Oracle Performance Survival Guide A Systematic Approach


to Database Optimization 1st Edition Guy Harrison

https://ebookname.com/product/oracle-performance-survival-guide-
a-systematic-approach-to-database-optimization-1st-edition-guy-
harrison/

Oracle Database 12c Performance Tuning Recipes A


Problem Solution Approach 1st Edition Sam R. Alapati

https://ebookname.com/product/oracle-database-12c-performance-
tuning-recipes-a-problem-solution-approach-1st-edition-sam-r-
alapati/

Oracle Essentials Fourth Edition Oracle Database 11g


Rick Greenwald

https://ebookname.com/product/oracle-essentials-fourth-edition-
oracle-database-11g-rick-greenwald/

Kings of the forest the cultural resilience of


Himalayan hunter gatherers 1 New Edition Jana Fortier

https://ebookname.com/product/kings-of-the-forest-the-cultural-
resilience-of-himalayan-hunter-gatherers-1-new-edition-jana-
fortier/
US Pension Reform Lessons from Other Countries 1 New
Edition Martin Neil Baily

https://ebookname.com/product/us-pension-reform-lessons-from-
other-countries-1-new-edition-martin-neil-baily/

Structuring Islamic Finance Transactions 1st Edition


Abdulkader Thomas

https://ebookname.com/product/structuring-islamic-finance-
transactions-1st-edition-abdulkader-thomas/

Mcqs In Radiology For Residents And Technologists 2nd


Edition Sumeet Bhargava

https://ebookname.com/product/mcqs-in-radiology-for-residents-
and-technologists-2nd-edition-sumeet-bhargava/

How to Succeed at the Medical Interview HOW How To 1st


Edition Chris Smith

https://ebookname.com/product/how-to-succeed-at-the-medical-
interview-how-how-to-1st-edition-chris-smith/

Manufacturing Yogurt and Fermented Milks 1st ed Edition


Ramesh C. Chandan

https://ebookname.com/product/manufacturing-yogurt-and-fermented-
milks-1st-ed-edition-ramesh-c-chandan/
Casualty of War A Childhood Remembered Eastern European
Studies 18 1st Edition Luisa Lang Owen

https://ebookname.com/product/casualty-of-war-a-childhood-
remembered-eastern-european-studies-18-1st-edition-luisa-lang-
owen/
Oracle Database
Performance
and Scalability
quantitative software eng new cp_quantitative software eng cp.qxd 8/11/2011 12:06 PM Page 1

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 Performance and Scalability / Henry H. Liu

Managing the Development of Software-Intensive Systems / James McDonald

Trustworthy Compilers / Vladimir O. Safonov

Oracle Database Performance and Scalability: A Quantitative Approach /


Henry H. Liu

Enterprise Software Architecture and Design: Entities, Services and


Resources / Dominic Duggan
Oracle Database
Performance
and Scalability
A Quantitative Approach

Henry H. Liu
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 database performance and scalability : 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

10 9 8 7 6 5 4 3 2 1
To My Family
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

ACKNOWLEDGMENTS xxxiii

INTRODUCTION 1

Features of Oracle / 2
Objectives / 4
Conventions / 5
Performance versus Scalability / 6

PART 1 GETTING STARTED WITH ORACLE 7

1 Basic Concepts 9
1.1 Standard versus Flavored SQLS / 10
1.2 Relational versus Object-Oriented Databases / 11

vii
viii CONTENTS

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 Software / 15
2.2 Configuring a Listener / 18
2.3 Creating an Oracle Database / 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 Manager 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, Functions, and Triggers / 68
4.8 Referential Integrity with Foreign Keys / 71
4.9 Summary / 73
CONTENTS ix

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 Performance (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 Management
(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
x CONTENTS

8.3 Managing Data Files / 122


8.4 Managing Redo Logs / 124
8.5 Summary / 125
Recommended Reading / 125
Exercises / 126

9 Oracle Wait Interface (OWI) 127


9.1 Ratio-based versus OWI-based Oracle Performance
Tuning Methodologies / 128
9.2 Wait Event—The Core Concept
of OWI / 130
9.3 Classification of Wait Events from
OWI / 131
9.4 The Other Part (CPU Time) of the Equation Elapsed
Time ¼ CPU Time þ Wait Time / 134
9.5 AWR as a Compass to Tuning Oracle Performance and
Scalability / 136
9.6 Summary / 137
Recommended Reading / 137
Exercises / 138

10 Oracle Data Consistency and Concurrency 139


10.1 Select . . . for Update Statement / 140
10.2 ACID Properties of Transactions / 141
10.3 Read Phenomena and Data Inconsistencies / 143
10.4 Oracle Isolation Levels / 145
10.5 Multi-Version Concurrency Control (MVCC) and
Read Consistency / 145
10.6 Oracle Locks / 146
10.7 Lock Escalations versus Conversions / 149
10.8 Oracle Latches / 149
10.9 Oracle Enqueues / 150
10.10 Deadlocks / 150
10.11 Taking Advantage of Oracle’s Scalable Concurrency
Model / 151
10.12 Case Study: A JDBC Example / 152
10.13 Summary / 158
Recommended Reading / 159
Exercises / 159
CONTENTS xi

11 Anatomy of an Oracle Automatic Workload Repository


(AWR) Report 161
11.1 Importance of Performance Statistics / 162
11.2 AWR Report Header / 165
11.3 Report Summary / 166
11.3.1 Cache Sizes / 166
11.3.2 Load Profile / 167
11.3.3 Instance Efficiency Percentages
(Target 100%) / 169
11.3.4 Shared Pool Statistics / 170
11.3.5 Top Five Timed Events / 170
11.4 Main Report / 171
11.5 Wait Events Statistics / 172
11.5.1 Time Model Statistics / 173
11.5.2 Wait Class / 174
11.5.3 Wait Events / 174
11.5.4 Background Wait Events / 176
11.5.5 Operating System Statistics / 176
11.5.6 Service Statistics / 177
11.5.7 Service Wait Class Stats / 178
11.6 SQL Statistics / 178
11.6.1 SQL ordered by Elapsed Time / 179
11.6.2 SQL ordered by CPU Time / 180
11.6.3 SQL ordered by Gets / 180
11.6.4 SQL ordered by Reads / 181
11.6.5 SQL ordered by Executions / 182
11.6.6 SQL ordered by Parse Calls / 183
11.6.7 SQL ordered by Sharable Memory / 183
11.6.8 SQL ordered by Version Count / 183
11.6.9 Complete List of SQL Text / 184
11.7 Instance Activity Statistics / 185
11.7.1 Instance Activity Stats / 185
11.7.2 Instance Activity Stats—Absolute Values / 196
11.7.3 Instance Activity Stats—Thread Activity / 197
11.8 IO Stats / 197
11.8.1 Tablespace IO Stats / 198
11.8.2 File IO Stats / 198
11.9 Buffer Pool Statistics / 199
11.10 Advisory Statistics / 199
11.10.1 Instance Recovery Stats / 200
11.10.2 Buffer Pool Advisory / 200
11.10.3 PGA Aggr Summary / 201
11.10.4 PGA Aggr Target Stats / 202
xii CONTENTS

11.10.5 PGA Aggr Target Histogram / 202


11.10.6 PGA Memory Advisory / 203
11.10.7 Shared Pool Advisory / 204
11.10.8 SGA Target Advisory / 204
11.10.9 Streams Pool Advisory / 205
11.10.10 Java Pool Advisory / 205
11.11 Wait Statistics / 206
11.12 Undo Statistics / 207
11.13 Latch Statistics / 208
11.13.1 Latch Activity / 208
11.13.2 Latch Sleep Breakdown / 213
11.13.3 Latch Miss Sources / 214
11.13.4 Parent and Child Latch Statistics / 215
11.14 Segment Statistics / 215
11.14.1 Segments by Logical Reads / 215
11.14.2 Segments by Physical Reads / 216
11.14.3 Segments by Row Lock Waits / 217
11.14.4 Segments by ITL Waits / 217
11.14.5 Segments by Buffer Busy Waits / 217
11.15 Dictionary Cache Stats / 218
11.16 Library Cache Activity / 219
11.17 Memory Statistics / 219
11.17.1 Process Memory Summary / 219
11.17.2 SGA Memory Summary / 220
11.17.3 SGA Breakdown Difference / 221
11.18 Streams Statistics / 222
11.19 Resource Limit Stats / 224
11.20 init.ora Parameters / 224
11.21 Summary / 225
Recommended Reading / 225
Exercises / 226

12 Oracle Advanced Features and Options 227


12.1 Oracle 8i New Features / 227
12.1.1 Java / 228
12.1.2 Oracle interMedia, Spatial, Time Series, and Visual
Image Retrieval / 229
12.1.3 Oracle Parallel Server / 230
12.1.4 Optimizer Plan Stability / 230
12.1.5 Locally Managed Tablespaces / 230
12.1.6 Online Index Creation and Rebuild / 231
12.1.7 Online Read-Only Tablespaces / 231
CONTENTS xiii

12.1.8 Temporary Tables / 231


12.1.9 Non-Blocking OCI (Oracle Call Interface) / 231
12.1.10 Function-Based Indexes / 232
12.1.11 Logical ROWIDs / 232
12.1.12 Enhanced Partitioning / 232
12.1.13 Connection Load Balancing / 233
12.1.14 Client Load Balancing / 233
12.1.15 Oracle Enterprise Manager / 233
12.2 Oracle 9i New Features / 233
12.2.1 Real Application Clusters (RAC) / 234
12.2.2 Data Guard / 236
12.2.3 Performance Tuning Intelligent Advisors / 239
12.2.4 Actual Operation-Level Query Statistics / 239
12.2.5 Dynamic Sampling of Optimizer Statistics / 239
12.2.6 Cloning Production Database with Oracle
Enterprise Manager / 240
12.2.7 Renaming Columns and Constraints / 241
12.2.8 Dynamic Memory Pools / 241
12.2.9 Flashback Query / 241
12.2.10 List Partitioning / 241
12.3 Oracle 10g New Features / 241
12.3.1 Automatic Storage Management (ASM) / 242
12.3.2 Asynchronous Commit / 244
12.3.3 Database Replay / 244
12.3.4 Read Performance Statistics Directly from the
SGA / 245
12.3.5 Automatic Workload Repository (AWR) / 245
12.3.6 Automatic Database Diagnostic Monitor
(ADDM) / 245
12.3.7 Automatic Shared Memory Tuning / 245
12.3.8 Automatic Optimizer Statistics Gathering / 245
12.3.9 SQL Tuning Features / 247
12.3.10 Grid Computing / 247
12.4 Oracle 11g New Features / 248
12.4.1 Automatic Memory Management / 249
12.4.2 Intelligent Cursor Sharing / 249
12.4.3 Database Resident Connection Pool
(DRCP) / 249
12.4.4 Server Result Cache / 250
12.4.5 Database Smart Flash Cache / 251
12.4.6 Database Replay SQL Performance Analyzer
(SPA) Integration / 252
12.4.7 I/O Calibration / 252
12.4.8 Partitioning Enhancements / 252
xiv CONTENTS

12.4.9 SQL Plan Management / 253


12.4.10 Zero-Size Unusable Indexes and Index
Partitions / 254
12.4.11 Invisible Indexes / 254
12.4.12 Virtual Columns / 254
12.5 Summary / 255
Recommended Reading / 255
Exercises / 255

13 Top 10 Oracle Performance and Scalability Features 257


13.1 Real Application Clustering (RAC) / 258
13.2 Dedicated versus Shared Server Models / 260
13.3 Proven Transaction and Concurrency Models / 260
13.4 A Highly Efficient SQL Optimization Engine / 261
13.5 Efficient Parallel Processing with Modern Multi-Core
CPUs / 261
13.6 Partitioning / 262
13.7 An All-Encompassing, Powerful Performance,
and Scalability Troubleshooting Tool—AWR / 262
13.8 The Most Comprehensive Set of Internal Performance
Metrics / 263
13.9 Database Resident Connection Pool / 263
13.10 In-Memory Database Cache (IMDB) / 263
13.11 Summary / 263
Recommended Reading / 264
Exercises / 264

14 Oracle-Based Application Performance and Scalability


by Design 266
14.1 Rapid Development Methodologies / 268
14.2 Planning / 269
14.2.1 Vision / 269
14.2.2 Objectives / 270
14.2.3 ROI Analysis / 270
14.2.4 Feasibility Study / 271
14.2.5 Project Team Formation / 271
14.3 Requirements Gathering / 272
14.3.1 Use Cases / 273
14.3.2 User Views / 274
14.3.3 Business Processes, Entities, and Business
Rules / 274
CONTENTS xv

14.4 Conceptual Design via Data Modeling / 275


14.4.1 Entity-Relationship Diagramming / 276
14.4.2 The Information Engineering (IE) Format for
ERDs / 278
14.4.3 UML Format for ERDs / 279
14.4.4 Relational Format for ERDs / 279
14.5 Logical Design via Normalization / 280
14.5.1 Operational Anomalies / 281
14.5.2 Review of Relation Theory / 282
14.5.3 Functional Dependencies and Lossless-Join
Decompositions / 285
14.5.4 First Normal Form (1NF): Avoiding
Multi-Valued Columns / 287
14.5.5 Second Normal Form (2NF): Eliminating
Partial Dependencies / 288
14.5.6 Third Normal Form (3NF): Eliminating
Transitive Dependencies: / 288
14.5.7 Boyce-Codd Normal Form (BCNF): Eliminating
Key—Non-Key Dependencies / 289
14.5.8 Fourth Normal Form (4NF): Trivializing or Keying
Multi-Valued Dependencies / 290
14.5.9 Fifth Normal Form (5NF): Trivializing or Keying
Join Dependencies / 292
14.5.10 Which Level of Normalization to Settle
Down? / 294
14.5.11 Denormalization? / 294
14.6 Physical Design / 295
14.6.1 Naming Conventions / 297
14.6.2 Creating Tablespaces / 298
14.6.3 Creating a Schema User with Proper
Privileges / 299
14.6.4 Creating Application Schema Objects / 299
14.6.5 Changing Schema Objects / 308
14.6.6 Enforcing Business Rules and Data
Integrity / 309
14.6.7 Adding Views / 312
14.6.8 Creating Sequences and Synonyms / 312
14.6.9 Adding Indexes / 313
14.6.10 Security / 314
14.7 Implementation / 315
14.7.1 Choosing an Effective and Efficient Coding
Path / 315
14.7.2 Leveraging Proven Oracle Database Design
Principles / 316
xvi CONTENTS

14.7.3 Leveraging Proven Application Design


Patterns / 318
14.7.4 Enforcing with an Effective and Efficient Testing
Process / 319
14.8 Release To Market (RTM) / 322
14.9 Continuous Improvements / 322
14.10 Summary / 323
Recommended Reading / 324
Exercises / 325

15 Project: Soba—A Secure Online Banking Application


on Oracle 326
15.1 GettingSOBA Up and Running / 328
15.1.1 Prerequisite Software / 328
15.1.2 Initial Software Stack Setup / 329
15.1.3 Creating SOBA Database on Oracle / 330
15.1.4 Installing SOBA on Eclipse IDE / 330
15.1.5 Configuring SOBA to Work with Oracle / 331
15.1.6 Configuring SOBA to Work with
Hibernate / 333
15.1.7 Building SOBA and Deploying SOBA with
Ant to Run on Tomcat / 333
15.2 Overview of Spring Framework / 333
15.2.1 Background / 333
15.2.2 Spring for Building Flexible Applications
Faster / 334
15.2.3 Spring Inversion of Control (IoC) and
Dependency Injection / 335
15.2.4 Features of Spring 3.0 / 336
15.3 MVC Architecture / 337
15.3.1 MVC Architecture in General / 338
15.3.2 Spring MVC in Action with SOBA / 340
15.4 Spring MVC Framework Applied to SOBA / 342
15.4.1 Spring DispatcherServlet and
WebApplicationContext / 343
15.4.2 Logic Flow of SOBA Defined in Spring
MVC Framework / 347
15.4.3 A Web Entry Point Defined in a Spring
MVC Web Form / 348
15.4.4 Handler Mapping / 350
15.4.5 Implementing Spring Controllers / 353
15.4.6 A Typical View Defined in a Spring MVC Web
Form / 358
CONTENTS xvii

15.4.7 A Typical Form Success Controller and its


Resultant View / 362
15.4.8 POJOs Referenced in the
CreateCustomerFormController / 364
15.5 Hibernate Object-Relational Mapping (ORM) Applied
to SOBA / 368
15.5.1 Benefits of Using Hibernate / 369
15.5.2 Metadata Mapping with Hibernate / 370
15.5.3 Configuring Hibernate to Work with
Oracle / 371
15.5.4 Hibernate DAO / 373
15.6 RESTful Web Services Applied to SOBA / 376
15.6.1 Introduction to RESTful Web Services / 376
15.6.2 RESTful Constraints / 377
15.6.3 RESTful Interface Design Principles / 378
15.6.4 Spring’s Support for RESTful Web
Services / 379
15.6.5 Server Code / 380
15.6.6 Client Code / 383
15.7 Spring Security Applied to SOBA / 386
15.7.1 Basic Concepts / 387
15.7.2 Security Configured in web.xml / 387
15.7.3 Security Configured in soba-security.xml / 388
15.7.4 Implementing Spring Security in Views / 394
15.8 Spring ACL Applied to SOBA / 394
15.8.1 Creating ACL Tables in Oracle / 395
15.8.2 Configuring Spring ACL / 395
15.8.3 Maintaining ACLs for SOBA Domain
Objects / 398
15.8.4 Applying ACLs to Business
Operations / 404
15.8.5 Testing ACLs with SOBA / 406
15.9 Summary / 413
Recommended Reading / 414
Exercises / 414

PART 3 OPTIMIZING ORACLE PERFORMANCE


AND SCALABILITY 415

16 Logistics of the Oracle Cost-Based Optimizer (CBO) 417


16.1 Life of a SQL Statement in Oracle / 418
16.2 Oracle SQL Optimizer: Rule-Based versus
Cost-Based / 420
xviii CONTENTS

16.3 CBO Statistics / 421


16.4 Pivot Role of Gathering Database Statistics to CBO / 422
16.5 Methods of Gathering CBO Statistics / 424
16.6 Locking and Unlocking CBO Statistics / 425
16.7 Explain Plan—A Handle to CBO / 425
16.8 Data Access Methods—CBO’s Footprints / 426
16.9 Looking Up CBO’s Plan Hidden in V$SQL_PLAN / 427
16.10 When CBO may Generate Suboptimum
Execution Plans / 428
16.11 Summary / 429
Recommended Reading / 429
Exercises / 430

17 Oracle SQL Tuning 431


17.1 Tuning Joins / 432
17.2 Tuning Subqueries / 437
17.3 Case Study: Performance of SUBQUERY versus
JOIN / 439
17.4 Case Study: Performance of IN versus EXISTS / 443
17.5 Case Study: A SQL Tuning Yielded a 12x Performance
Gain / 444
17.6 Summary / 447
Recommended Reading / 447
Exercises / 448

18 Oracle Indexing 449


18.1 Rules of Thumb on Indexing / 450
18.2 Creating and Using Ubiquitous b-Tree Indexes / 451
18.3 Advanced Indexing Scheme I: Covering Indexes versus
Index-Organized Tables / 452
18.4 Advanced Indexing Scheme II: Function-Based Indexes
(FBIs) / 453
18.5 Unusual Indexing Scheme I: BITMAP Indexes / 454
18.6 Unusual Indexing Scheme II: Reverse Key Indexes / 455
18.7 Unusual Indexing Scheme III: Compressed Composite
Indexes / 455
18.8 How To Create Oracle Indexes / 456
18.9 Summary / 457
Recommended Reading / 458
Exercises / 458
CONTENTS xix

19 Auto_Tune Features 459


19.1 Oracle Automatic Database Diagnostic Monitor
(ADDM) / 460
19.2 Automatic Undo Management / 462
19.3 Data Recovery Advisor / 462
19.4 Memory Advisors / 462
19.5 MTTR Advisor / 466
19.6 Segment Advisor / 466
19.7 SQL Advisors / 467
19.8 SQL Performance Analyzer / 469
19.9 Summary / 470
Recommended Reading / 471
Exercises / 471

PART 4 CASE STUDIES: ORACLE MEETING REAL WORLD


PERFORMANCE AND SCALABILITY CHALLENGES 473

20 Case Study: Achieving High Throughput with Array


Processing 477
20.1 Context / 478
20.2 Performance Model / 479
20.3 Tests / 480
20.4 Solution / 480
20.5 Effects of Array Processing / 482
20.6 Summary / 484
Recommended Reading / 484
Exercises / 484

21 Case Study: Performance Comparison of Heap-Organized


versus Index-Organized Tables 485
21.1 Context / 486
21.2 Conversion from Heap-Organized to Index-Organized /
487
21.3 Creating Indexes / 487
21.4 Creating Constraints / 488
21.5 EXPLAIN PLANs / 488
21.6 Oracle SQL Traces / 489
21.7 Summary / 490
Recommended Reading / 491
Exercises / 491
xx CONTENTS

22 Case Study: SQL Tuning: “IN” versus “OR” versus


Global Temporary Table 492
22.1 Context / 493
22.2 Test Program / 494
22.3 Observation 1: IN_CreateStatement is the Best
Performer / 495
22.4 Observation 2: Batch Insert Saves Time / 497
22.5 Temptable Performed Better without an Index Hint than with
an Index Hint / 498
22.6 Effects of APPEND Hint for Populating Temptable / 499
22.7 Effects of Number of Iterations / 499
22.8 OR and IN without the Index Hint / 499
22.9 Limitation on the Number of Literal Values and the Size of
OR Statement / 501
22.10 Dealing with More Than 1000 Literal Values for an IN Based
SQL Query / 501
22.11 A Recommendation for Dealing with 1000 Literal Value
Limit in an IN Statement / 501
22.12 Summary / 502
Recommended Reading / 503
Exercises / 503

23 Case Study: Data Access Paths (Double Buffering) 504


23.1 Data Access Paths in General / 505
23.1.1 Data Buffering / 507
23.1.2 Inode Locking / 509
23.1.3 Write-Sync Daemon / 510
23.2 Test Environments / 511
23.2.1 Solaris on Veritas / 511
23.2.2 Solaris on UFS / 511
23.2.3 Windows on NTFS / 512
23.3 Test Results with Solaris on Veritas / 514
23.3.1 Test Run #1—145 ms Average Read Time / 514
23.3.2 Test Run #2—401 ms Average Read Time / 516
23.3.3 Test Run #3—261 ms Average Read Time / 518
23.3.4 Test Run #4—0.98 ms Average Read Time / 519
23.3.5 Analysis / 521
23.4 Test Results with Solaris on UFS / 522
23.4.1 Test Run #1—447 ms Average Read Time / 522
23.4.2 Test Run #2—10ms Average Read Time / 524
23.4.3 Analysis / 525
CONTENTS xxi

23.5 Test Results with Windows on NTFS / 526


23.5.1 Test Run—8 ms Average Read Time / 526
23.5.2 Analysis / 528
23.6 Moral of the Case Study / 528
Recommended Reading / 529
Exercises / 530

24 Case Study: Covering Index 531


24.1 Getting to Know the Application Architecture / 533
24.2 Quantifying the Problems / 533
24.3 Analyzing Bottlenecks / 533
24.4 Applying Optimizations/Tunings / 535
24.5 Verifying the Fixes / 535
24.5.1 Report Summary / 537
24.5.2 Wait Events Statistics / 538
24.5.3 SQL Statistics / 541
24.5.4 IO Stats / 544
24.5.5 Buffer Pool Statistics / 544
24.5.6 Wait Statistics / 544
24.5.7 init.ora Parameters / 545
24.6 Moral of the Case Study / 545
Recommended Reading / 546
Exercises / 546

25 Case Study: CURSOR_SHARING 547


25.1 The Concept of a Bind Variable / 548
25.2 Oracle CURSOR_SHARING Parameter / 549
25.3 Getting to Know the Application Architecture / 550
25.4 Quantifying Problems / 550
25.5 Analyzing Bottlenecks / 551
25.5.1 Report Summary / 552
25.5.2 SQL Statistics / 556
25.5.3 IO Stats / 557
25.5.4 Wait Statistics / 558
25.5.5 init.ora Parameters / 558
25.6 Applying Tuning: CURSOR_SHARING = FORCE / 560
25.6.1 Report Summary / 561
25.6.2 Wait Events Statistics / 563
25.7 Applying Tuning: CURSOR_SHARING = SIMILAR / 564
25.7.1 Report Summary / 564
25.7.2 Wait Events Statistics / 566
xxii CONTENTS

25.8 Moral of the Case Study / 569


Recommended Reading / 569
Exercises / 570

26 Case Study: Bulk Transactions 571


26.1 Application Architecture / 572
26.2 Quantifying Problems / 572
26.3 Identifying Performance and Scalability Optimization
Opportunities / 573
26.3.1 Report Summary / 573
26.3.2 Wait Events Statistics / 575
26.3.3 SQL Statistics / 577
26.3.4 Wait Statistics / 579
26.4 Effects of Bulk Transactions on Performance / 581
26.4.1 Report Summary / 581
26.4.2 Wait Events Statistics / 583
26.4.3 SQL Statistics / 585
26.4.4 Wait Statistics / 587
26.5 Moral of the Case Study / 592
Recommended Reading / 593
Exercises / 593

27 Case Study: Missing Statistics 594


27.1 Decaying Performance due to Missing Statistics / 595
27.2 First Run with no Statistics / 597
27.2.1 Report Summary / 598
27.2.2 Wait Events Statistics / 599
27.2.3 SQL Statistics / 601
27.2.4 IO Stats / 602
27.2.5 Wait Statistics / 602
27.2.6 init.ora Parameters / 603
27.3 Second Run with Missing Statistics / 604
27.3.1 Report Summary / 605
27.3.2 Wait Events Statistics / 606
27.3.3 SQL Statistics / 607
27.3.4 IO Stats / 609
27.3.5 Wait Statistics / 609
27.4 Third Run with Updated Statistics / 611
27.4.1 Report Summary / 611
27.4.2 Wait Events Statistics / 613
27.4.3 Operating System Statistics / 614
27.4.4 SQL Statistics / 614
CONTENTS xxiii

27.4.5 Wait Statistics / 616


27.5 Moral of the Case Study / 618
Recommended Reading / 618
Exercises / 618

28 Case Study: Misconfigured SAN Storage 620


28.1 Architecture of the Apple’s Xserve RAID / 621
28.2 Problem Analysis / 622
28.2.1 Report Summary / 622
28.2.2 Wait Events Statistics / 624
28.2.3 IO Stats / 625
28.2.4 init.ora Parameters / 625
28.3 Reconfiguring the RAID and Verifying / 626
28.3.1 Report Summary / 626
28.3.2 Wait Events Statistics / 628
28.3.3 IO Stats / 629
28.4 Moral of the Case Study / 629
Recommended Reading / 630
Exercises / 630

APPENDIX A ORACLE PRODUCT DOCUMENTATIONS 633


A.1 Oracle Database Concepts / 633
A.2 Oracle Database Administrator’s Guide / 633
A.3 Oracle Database Reference / 634
A.4 Oracle Database Performance Tuning Guide / 634
A.5 Oracle Database 2 Day þ Performance Tuning
Guide / 634
A.6 Oracle Database 2 Day DBA / 634
A.7 Oracle Database SQL Language Reference / 634
A.8 Oracle Database Sample Schemas / 635
A.9 Oracle Database PL/SQL Packages and Types
Reference / 635
A.10 Oracle Database PL/SQL Language Reference / 635
A.11 Oracle Database JDBC Developer’s Guide and
References / 635

APPENDIX B USING SQL PLUS WITH ORACLE 636


B.1 Installation / 636
B.2 SQL Plus and tnsnames.ora File / 637
B.3 Basics of SQL Plus / 638
xxiv CONTENTS

B.4 Common SQL Plus Commands / 638


B.5 Using SQL Plus to Execute SQL Statements / 639
B.6 Using SQL Plus to Execute PL/SQL Blocks / 640
B.7 Using SQL Plus Autotrace to Obtain EXECUTION PLANs
and Optimizer Statistics / 640
B.8 Using SQL Plus Timing Command / 641
B.9 Exporting/Importing Oracle Databases with
SQL Plus / 642
B.10 Creating AWR Reports with SQL Plus / 643
B.11 Checking Tablespace Usage with SQL Plus / 644
B.12 Creating EM DBConsole with SQL Plus / 646

APPENDIX C A COMPLETE LIST OF ALL WAIT EVENTS IN


ORACLE 11g 648
APPENDIX D A COMPLETE LIST OF ALL METRICS WITH
THE V$STATNAME VIEW 656
APPENDIX E A COMPLETE LIST OF ALL STATISTICS WITH
THE V$SYSSTAT VIEW 667

INDEX 681
Another Random Document on
Scribd Without Any Related Topics
engagement yet. Sucking-pig and one of the fat turkeys, and ask
Juke to join us. Eh?"
"My dear," I replied, "I am perfectly willing to celebrate the
engagement in any way you like—yes, we'll have a nice dinner, and
ask Dr. Juke—I am sure we owe him every attention that we can
possibly pay him; but what I want to warn you against is letting
them suppose that there is to be any celebration of the marriage—
with our consent."
Tom stared as if he did not understand.
"You mean, not immediately?" he questioned. "Of course not."
"I mean, not for years," I solemnly urged. "Tom, you must back me
up in this. The boy is but a boy, with his way to make in the world.
Before we allow him to saddle himself with a wife who will probably
be quite useless—those University women always are—and the
responsibilities of a family, he must be in a position to afford it."
"Yes," said Tom, in a tepid way. "But you and I, Polly——"
"Oh, never mind about you and me," I broke in; "that is altogether
different"—for of course it was. "You were a man of twice his age."
"Which would make him about fourteen," said my husband, trying to
be funny.
As for me, I saw nothing to laugh at. I cannot imagine a more
serious position as between parent and child. "At his time of life," I
said, "four years are equal to ten at any other stage. Let him have
those four years—let him begin where his father did—and I shall be
quite satisfied."
"Well, you see, my dear, it hardly rests with us, does it?"
Tom stirred up the mother sow with his walking-stick, and sniggered
in a most feeble-minded fashion.
"How? Why not?" I demanded. "Do you mean to say you have not
the power to influence him? Do you think that Harry, if properly
advised, would persist in taking his own way in spite of us? I refuse
to believe that any son of mine could do such a thing."
Again Tom laughed, looking at me as if he saw some great joke
somewhere. I asked him what it was, and he said, "Oh, never mind
—nothing." But I knew. He was thinking of my own elopement, to
which I was driven by my father's second marriage—an incident that
had no bearing whatever upon the present case. It exasperated me
to see him so flippant about a matter of really grave importance, but
I determined not to let him draw me into a dispute.
"Four years," I said mildly, "would give them time to know each
other and their own minds. It would be a test, to prove them. If at
the end of four years they were still faithful, I should feel assured
that all was well. But of course they would get tired of each other
long before that, and so he would be spared a terrible fate, and all
the trouble would be at an end."
We had left the pigsty and were pacing the paths of the kitchen
garden, surveying the depredations of the irrepressible slug.
"The rain seems to wash the soot away as fast as I put it on," sighed
Tom. "I'll get a bag of lime, and try what that'll do. Well, Polly, for
my part, I should be very sorry to think them likely to get tired of
each other. And I don't believe it, either. I don't think she's that sort
of a girl somehow."
"How like a man!" I ejaculated. "Just because she's got a pretty
face!"
"No, not because she's got a pretty face—though it is a pretty face—
but because she's good as well as pretty. She's a right down good
girl, my dear, believe me—just the sort of daughter-in-law I'd have
chosen for myself, if I had had the choosing. I told Harry so. You
should have seen how pleased he was!"
"No doubt. But I don't see how you can know whether she's good or
not. You are not always with her, as we are."
"Oh, I see her at times. We have little talks occasionally. A man can
soon tell." He put his arm round my waist as we paced along. "I
haven't been married to you for all these years without knowing a
good woman from a bad one, Polly."
It was intended for a compliment, but somehow I could not smile at
it. In fact, I shed a tear instead. And when he saw it, and stooped to
kiss it away, my feelings overcame me. I threw my arms round his
neck and begged him not to let fascinating daughters-in-law draw
away his heart from his old wife. I daresay it was silly, but I could
not help it. Of course he chuckled as if I had said something very
funny. And his only reply was "Baby!"—in italics. So like a man, who
never can see a meaning that is not right on the top of a word.
However, I promised to be nice to Emily—nicer, rather, for, as I told
him, I had always been nice to her—and he said he would take an
early opportunity to have a serious talk with Harry.
"But let the poor chap alone till he gets his strength again," he
pleaded—as if I were a perfect tyrant, bent on making the boy
miserable; "let the poor children enjoy their love-making for the little
while that Emily remains here. She has been telling me that she's
got a fine appointment in a school—joint principal—and that she's
going to work in a fortnight—to work and save for their little home,
till Harry is ready for her."
"What?" I exclaimed. "She never told me that."
"She will, of course, when you give her the chance," said Tom, with
an air of apology.
"She ought to have told me, she ought to have confided in me, first
of all," I urged, much hurt, as I had every right to be; "I can't
understand why she did not. You seem," I concluded passionately
—"you all seem to be having secrets behind my back, and shutting
me out of everything, as if I were everybody's enemy. It is always
so!"
"It is never so," replied Tom, laying his arm round my shoulder. "You
are never outside, old girl, except when you won't come in."
That was what they always said when they wanted to defend
themselves.
But here we dropped the painful subject, and discussed the details
of our proposed festival.
"Only Juke?" I inquired, counting on my fingers. "That makes seven
in all—an awkward number."
"No matter for a family party," said Tom. "We are not going in for
style this time. The boy in his armchair and pillows will take the
room of two."
"Still, we may as well make it an even eight," I urged. "Otherwise
the table will look lopsided, and one or other of the girls will have
nobody to talk to."
"They will be quite satisfied to have their brother to look at. No, no,
Polly, don't let us make a company affair of it, for goodness' sake.
Harry wouldn't like it, or be fit for it either."
"And isn't Juke company?"
"By Heavens, no! We owe it to that young fellow that our only son
isn't in his grave—yes, Polly, I am convinced of it—and my house is
his, and all that's in it. Besides, he'll be here professionally—to see
that Harry doesn't overeat himself. Oh, Juke is quite another pair of
shoes."
I certainly did not see it. He had served us well, no doubt, and we
had paid him well; each side had done its part in a generous and
conscientious spirit. I considered he had no more claim on us now
than the thousands of passengers Tom had carried when he was a
sea captain had on him. I am sure no doctor in the world can match
a ship's commander of the most common type for self-denying
devotion to the cause of duty. But, seeing Tom so inclined to be
cross and unreasonable, I thought it better to say no more. We
returned to the sty to select the piglet that was to be killed, and in
my own mind I selected the guest who should make the table
symmetrical. I knew that Harry would only rejoice to see another
friend, and it was due to Phyllis to provide her as well as the others
with a companion. It was also an opportunity which I did not feel it
right to miss for serving her interests in other ways.
I am not one of those vulgar match-makers who are the laughing-
stock of the young men, and properly so—quite the contrary, indeed:
no one can accuse me of scheming to get my daughters married.
Still, they must be married some day—or should be, in the order of
nature—and surely to goodness a mother is permitted to safeguard,
to some extent, a thoughtless and ignorant girl against the greatest
of all the perils that her inexperience of life can expose her to. Not
for the world would I force her inclination in any way, but there is a
difference between doing that and letting her make a fool of herself
with the first casual puppy in coat and trousers that crosses her
path. The duty of parents is to protect their adolescent children from
themselves, as it were, in this incalculably important matter; that is
to say, to keep their path clear of acquaintanceships from which
undesirable complications might result, while encouraging innocent
friendships that may develop with impunity. Otherwise, what's the
use of being parents at all? Your children might as well be orphans,
and better. I neglected this duty, certainly, when I allowed Harry and
Emily Blount to have access to each other; but then a son is not like
a daughter—you can't be always overlooking him—and that affair
was a lesson to me. I determined to be more vigilant in Phyllis's
case.
Phyllis is not like other girls. I think I may say, without a particle of
vanity, that she is the very prettiest in Australia, at the least. There
may be greater beauties at home—I don't know, it is so long since I
was there; but if there be, I should like to see them. Her features
are not classical, of course, and that dear little piquant suggestion of
a cast in the left eye is a peculiarity, though it is not a defect, any
more than are the freckles she gets in summer: these trifles of detail
merely go to make the tout-ensemble what it is—so charming that
she has but to enter a room to eclipse every other woman in it. This
being so, I was naturally anxious that she should marry, when she
did marry, into her proper sphere, and not be thrown away upon a
man unworthy of her. And I only took the most simple and necessary
precaution for her safety when I limited my invitations to young
fellows whom I could trust—like Spencer Gale.
Tom says I never had a good word for Spencer Gale until he made
his fortune in Broken Hills. It amuses Tom to make these reckless
statements, and it doesn't hurt me in the least. I always liked the
boy, but any fair-minded person must have acknowledged that his
change of circumstances had improved him—brushed him up, and
brightened him in every way. It was not his wealth that induced me
to throw him into my daughter's company, but his sterling personal
qualities. A better son never walked, excepting my own dear Harry—
that alone was enough for me; a good son never fails to make a
good husband, as everybody knows.
His sister was a friend and neighbour of mine, and I knew that he
was staying with her. At one time all the family had lived here, Mr.
Gale having Tom's fancy for amateur farming and market-gardening
in his leisure hours. Spencer and Harry, both being clerks in
Melbourne offices, used to go into town together of a morning; that
was how we came to know them. But when Spencer had some
shares given him which went to a ridiculous price directly afterwards,
and when his money, by all sorts of lucky chances, bred money at
such a rate that he was worth (they said) a quarter of a million in a
twelvemonth, then they all left this out-of-the-way suburb for a big
place in Toorak—all except Mary Gale, who married a poor
clergyman before the boom. Mary's husband, Mr. Welshman, was the
incumbent of our parish, and her good brother was not at all too
grand to pay her visits at intervals, besides helping her to educate
the children. Which proved conclusively that prosperity had not
spoiled him.
I walked to the parsonage on Friday afternoon, hoping to find him
there; but he was out, and I only saw Mrs. Welshman. I used to like
Mary Welshman in the old days, but she has become quite spoiled
since people began to make a fuss of her family on Spencer's
account. It is always the case—I have noticed it repeatedly; when
sudden wealth comes to those who have not been accustomed to it,
it is the girls whose heads are turned. I asked for Spencer, and
mentioned that we wished him to dine with us, and you would have
thought I was seeking an audience with a king from his lord
chamberlain.
"Oh, I don't know, I'm sure," she said, with her absurd airs of
importance. "He is so much in request everywhere. He is certain to
have a dozen engagements. I don't think you have the remotest
chance of getting him, Mrs. Braye, on such short notice."
The fact was that she did not want me to get him. She had the fixed
delusion—all the Gales had—that there wasn't a mother or daughter
in the country who was not plotting to catch him for matrimonial
purposes; and she let me see very plainly her suspicion of my
motives and her fear of Phyllis's power.
"To-night," she exclaimed, in a tone of triumph—"to-night he is
dining at the Melbourne Club, to meet the Governor." Poor thing! It
was amusing to see how proud she was of it—evidently bursting to
proclaim the news to all and sundry.
"Very well," I said, smiling, "I will just drop a note to him at the
club."
And then I turned the conversation upon parish matters, as the best
way of taking the conceit out of her. For I don't believe in
clergymen's wives setting themselves up to patronise their lady
parishioners, on whose favour and subscriptions (to put it coarsely)
their husbands' livelihood depends.
On my way home I was fortunate enough to encounter Spencer Gale
himself. He was looking very well and handsome, riding a
magnificent horse, which curveted and pranced all over the road
when he checked its gallop in obedience to my uplifted hand. I felt a
thrill of maternal pride as I gazed at him—of maternal anxiety also.
"My boy," I cried, "do pray be careful! Remember what happened to
poor Harry from this sort of rashness, and what a valuable life it is
that you are risking!"
"Oh, it's all right, Mrs. Braye," he responded, in his nice, cheerful
way. "It is only oats and high spirits. How's Harry? Getting along like
a house afire, Mary tells me. I'm awfully glad."
Dear fellow! His kindness touched me to the heart. I suppose he was
afraid to dismount from that obstreperous beast, lest he should lose
control of it, and I am sure he could not help the way it tried to
trample on me with its hind legs when I came near enough to talk.
I told him how beautifully Harry was doing, and how he was to have
his first dinner with us on Sunday, and how delighted he would be to
see an old friend on such an occasion—and so on. Spencer seemed
not to understand me for a moment, owing to the clatter of the
horse, for he said he could not come because he was going to dine
with the Governor at the Melbourne Club.
"But that is to-night," I called. "And we want you for the day after
to-morrow—Sunday. Just a simple family meal at half-past one—pot-
luck, you know."
He did not answer for some minutes—thinking over his
engagements, doubtless; then he asked whether all of us were at
home. Aha! I knew what that meant, though of course I pretended I
didn't. I said that no member of the family would be so heartless as
to absent herself from such a festival as Harry's first dinner; that, on
the contrary, his sister was more devoted to him, and far more
indispensable both to him and to the house than a dozen hospital
nurses. I described in a few words what Phyllis had been to us
during our time of trouble, and he smiled with pleasure. And of
course he consented to accept the casual invitation for her sake,
pretending reluctance just to save appearances. It was arranged that
he would be at his sister's on Sunday, and walk back with us after
morning service.
I told Tom in the evening, when he was sitting in the garden with his
pipe, in a good temper. You would have supposed I was announcing
some dreadful domestic calamity.
"Whatever for?" he grumbled, with a most injured air. "I thought we
were to be a comfortable family party, just ourselves, and no fuss at
all."
"There will be no fuss," I said, "unless you make it. He is just coming
in a friendly, informal manner, to fill the vacant place. If you will
have Dr. Juke, there must be another man to balance the table."
"But why that man? You know Harry can't bear him since he's got so
uppish about his money and his swell friends. Why not have
somebody of our own class?—though I think it perfectly unnecessary
to have anybody under the circumstances."
"Our own class!" I indignantly exclaimed. "I hope you don't insult
your children, not to speak of me, by implying that they are not
good enough for Gales to associate with?"
"They are," said Tom; "they are—and a lot too good for one Gale to
associate with. But he don't think so, Polly."
"If he did not, would he do it?" was my unanswerable retort. But it is
useless trying to argue with a prejudiced man who is determined not
to see reason. And I felt it wise to leave him before he could draw
me into a dispute.
Harry, however, was equally exasperating. He said, "Oh, then I shall
make it Monday, if you don't mind. Better a dinner of herbs on
washing-day in peace and comfort than a stalled ox on Sunday with
Spencer Gale to spoil one's appetite and digestion for it." But Emily
rebuked him on my behalf. She had but to look at him to make him
do what she wished, and I suppose she thought it good policy to
propitiate the future mother-in-law.
Phyllis, whom I had expected to please—for whose sake I had gone
to all this trouble—was simply insolent. Alas! it is the tendency of
girls in these days. Respect for parents, trust in their judgment and
deference to their wishes, all the modest, dutiful ways that were the
rule when I was young, seem quite to have gone out of fashion. You
would have thought that she was the mother and I the daughter if
you had heard how she spoke to me, and seen the superior air with
which she stood over me to signify her royal displeasure.
"Oh, well, you have just gone and spoilt the whole thing—that's all."
I could have cried with mortification. But then, what's the use? It is
only what wives and mothers must expect when they try to do their
best for their families.
I had another struggle with her on Sunday morning. She refused to
accompany us to church. She said she was not going to offer herself
to Spencer Gale as a companion for a half-hour's walk—that he was
quite conceited enough without that; if other girls chose to run after
him and spoil him, she didn't. As if I would ask her to run after any
man! And as if Emily or I could not have walked home with our
guest! But I learned a little later what all this prudishness amounted
to. When we came back from church—Emily, Lily, Spencer, and I—we
found an empty drawing-room, Harry and Tom in armchairs on the
verandah, and Phyllis away in the kitchen garden gathering
strawberries for dessert with Dr. Juke! And I discovered that that
young man had interpreted an invitation to lunch at half-past one as
meaning that he should arrive punctually at twelve. Tom pretended
that he had called professionally at that hour, and been persuaded to
put his buggy up in our stables and remain.
"And I suppose you persuaded him?" I said, trying—because
Spencer was standing by me—to keep what I felt out of my voice.
"Well, my dear," replied the fatuous man, "the truth is, he didn't
want much pressing."
There are times when I feel that I could shake Tom, he is so
wooden-headed and silly—though so dear.
However, Phyllis, when I called her in, greeted Spencer Gale with
proper cordiality; and the whole family behaved better than I had
expected they would. They seemed to lay themselves out to be
pleasant all round, and to make Harry's first day downstairs a happy
one. It was a delightful early-summer day—he could not have had a
better—and our pretty home was looking its prettiest, for we had
had nice rains that year. Phyllis had decorated the table beautifully
with roses, and Jane had surpassed herself in cooking the dinner.
The pig was done to a turn—I never tasted anything so delicious—
and the turkey was a picture. We had our own green peas and
asparagus and young potatoes, and our own cream whipped in the
meringues and coffee jelly—in short, it was as good a dinner as any
millionaire could wish for, and in the end everything seemed to go as
I had intended it should.
Harry was no trouble at all. I purposely put him at his father's end of
the table, with Emily between him and Juke, to pacify him; and, with
his young lady at his side and Spencer as far off as possible, the
dear boy was as gay and good-tempered as could be, quite the life
of the party. Spencer sat between me and Phyllis, and she really
seemed to devote herself to him. I was surprised to see how little
fear she evidently had of appearing to throw herself at his head, like
the other girls; she chattered and joked to him—the prettiest colour
and animation in her face—and hardly glanced at Juke opposite,
who, for his part, confined his attentions to his neighbours, Miss
Blount and me, and was particularly unobtrusive and quiet.
As for Spencer Gale, he was most interesting in his descriptions of
what he had seen and done during his recent European travels; it
was quite an education to listen to him. I was particularly pleased
that he was so ready to talk on this subject, because I hate to have
the children grow up narrow-minded and provincial, ignorant of the
world outside their colony. It has been the dream of my life to take
them home and give them advantages, and I have never been able
to realise it. I could not help thinking, as that young man discoursed
of Paris and Venice and all the rest of it, what a delightful
honeymoon his bride might have! And so she did, as it turned out,
no great while afterwards.
Harry yawned and fidgeted, for sitting long in one position tired him;
so Tom and Juke carried him to a cane lounge on the verandah
before the rest of us had had dessert. I was annoyed with Phyllis for
running out to get pillows, which were already there, and for not
returning when she had made her brother comfortable. Emily had
the grace to remain at table, and of course Lily stayed also. She is a
most intelligent child, voracious for information of all sorts; and she
plied our guest with so many questions, and amused him so much
by her interest in his adventures, that she made him forget the
strawberries on his plate and how time was going—forgetting herself
that the poor servants were wanting to clear away so that they
might get out for their Sunday walk.
At last he finished, and I led the way to the verandah, where I
expected to find the others. But only Harry and his father were
there, the boy looking rather fagged and inclined to doze, and Tom—
who has no manners—placidly sucking at his pipe.
"Why, where is Phyllis?" I inquired.
"Kitchen," said Harry promptly, opening his eyes.
"And the doctor?"
"Gone off to a patient."
"Then," said I, "come and let me show you my roses, Mr. Gale;" and
I took his arm. I thought it a good opportunity to have a little quiet
talk with him on my own account. Afterwards I remembered that my
husband and son watched us rather anxiously as we sauntered off
into the garden, but I did not notice it at the time. It never crossed
my mind that they could deliberately conspire to deceive me.
I had had the garden tidied, and, in the first flush of the summer
bloom, it looked really beautiful—although I say it. I would not have
been ashamed to show it to the Queen herself. And our rustic
cottage, that we had continually been adding to and improving ever
since it came, a mere shanty, into our hands, was a study for a
painter, with the yellow banksia in perfection, quite hiding the
framework of the verandah. I halted my companion on the front
lawn, at the prettiest point of view.
"A humble little place," I remarked; "but I think I may say for it,
without undue vanity, that it looks like the home of gentlefolks."
He followed my gaze, and fixed his eyes upon the particular window
which I informed him belonged to Phyllis's room.
"What's she doing?" he inquired bluntly. He could not conceal his
impatience for her return.
I told him that, in the case of so variously useful a person, it was
impossible to say. I had no doubt she was attending to
housekeeping matters, which she never neglected for her own
amusement. Then I threw out a feeler or two, to test him—to learn,
if possible, something of his tastes and character; it was necessary,
for her sake, to do so. And I was delighted to find that he shared my
opinion of the colonial girl as a type, and agreed with me that the
term "unprotected female" should in these days be altered to
"unprotected male," seeing that it was the women who did all the
courting, and the men who were exposed to masked batteries, as it
were, at every turn.
"A fellow's never safe till he's married," said the poor boy, doubtless
speaking from painful experience. "And not then."
"That depends," said I. "There are people—I know plenty—who,
having married dolls like those we have been speaking of, find
themselves far indeed from being safe; but choose a good, modest,
clever, loving girl, who has been well brought up—one devoted to
her home and unspoiled by a vulgar society—and it is quite another
pair of shoes, as my husband would say. By the way, ask him what
he thinks of marriage for young men."
"I don't know that I want to ask anybody anything," he returned, a
little irritably—for Phyllis was still invisible—"except to leave me
alone to do as I like. I don't believe in having wives selected for me,
Mrs. Braye; I'm always telling my mother and sisters that, and they
won't pay the least attention. I think a fellow might be allowed to
please himself, especially a fellow in my position."
"Certainly," I said, with all the emphasis I could command. "Most
certainly. That is my own view exactly. I have always said that, in
respect of my own children, I would never force or thwart them in
any way. I chose the one I loved, regardless of wealth or poverty,
and they shall do the same. More than that," I added gaily, "I am
going to be the most charming mother-in-law that ever was! I shall
quite redeem the character. I will never attempt to interfere with my
children's households—never be de trop—never—oh! Why, there she
is!"
We were turning into a quiet path between tall shrubs—the fatal
place where, as I was told, Harry had been entrapped—and I
suddenly saw the gleam of a white dress in a little bower at the end
of it. At the same moment I saw—so did Spencer Gale—a thing that
petrified us both. I was struck speechless, but his emotion forced
him to hysteric laughter.
"I'm afraid," said he, recovering himself, "that we are de trop this
time, at any rate."
"Not at all," I retorted, also rallying my self-command. "Not at all.
We don't have anything of that sort in this family."
But the facts were too palpable; it was useless pretending to ignore
them. Phyllis jumped out of the arbour, like an alarmed bird out of
its nest, and came strolling towards us, affecting a nonchalant air,
but with a face the colour of beetroot with confusion; and that
unspeakable doctor, who had caused her so to forget herself,
strutted at her side, twirling the tip of his moustache and
endeavouring to appear as if he had not been kissing her, but
looking all the time the very image of detected guilt.
It is not necessary to state that Spencer Gale left immediately, and
never darkened our doors again. When, a little later, I had it out with
Phyllis, she declared, with a toss of the head, that she wouldn't have
taken him if there had been no other marriageable man living—that
there was only one husband for her, whom she intended to have
whether we liked it or not, even if she were forced to wait for him till
she was an old woman. I have often regretted that I did not control
myself better, but she, who had no excuse for violence, behaved like
a perfect lunatic. She went so far as to say she would never forgive
me for the insults I had heaped upon one—meaning Edmund Juke—
who had no equal in the universe, and who had saved her brother's
life. Of course she did not mean it—and I did not mean it—and we
forgave each other long ago; but I never hear the name of Spencer
Gale without the memory of that interview coming back to me, like a
bitter taste in the mouth.
He married about the same time as she did—a significant
circumstance! They say that he lost his boom money when the boom
burst, and that he drinks rather badly, and makes domestic scandals
of various kinds. If he does, it is no more than one might have
expected, considering the provocation. It is all very well for my
family to repeat these tales to his discredit, and then point to
Edmund Juke in Collins Street gradually climbing to the top of his
profession; they think this is sufficient to prove that they were
always Solomons of wisdom, and I a fool of the first magnitude. It
does not occur to them that if some things had been different, all
things would have been different. The one man would never have
fallen into low habits if he had had Phyllis for his wife, and the other
would never have risen so high if he had not had her. That is how I
look at it. And as for material prosperity, no one could have foreseen
how things were going to turn out, and luck is like the rain that falls
on the just and on the unjust—it comes to the people who don't
deserve it quite as often as to those who do.
For my part, I pay no heed to malicious gossip. There are always
envious persons ready and anxious to pull down those who are
placed above them; if they cannot find a legitimate pretext, they
invent one. I see for myself that he still lives in his beautiful Kew
house, that his wife still leads the fashion at every important social
function and drives the finest turn-out in Melbourne; that does not
look as if they were so very poor. And if one could forgive infidelities
in a married man, it would be in the case of one tied to a painted
creature who evidently cares for nothing but display and admiration
—to have her photograph flaunted in the public streets, and herself
surrounded by a crowd of so-called smart people, flattering her
vanity for the sake of her husband's position. He may have a
handsome establishment, but he cannot have a home. So who can
wonder if he seeks comfort elsewhere, and flies to the bottle to
drown his grief? It would have been very, very different if my
beautiful Phyllis had been at the head of affairs.
However, if she is satisfied, it is not for me to say a word.
CHAPTER VIII.

THE SILVER WEDDING.


Emily went to her school in Melbourne, and I had to get another
governess for Lily. She was a horrid woman. I stood her for one
quarter, and then packed her off; and we had to pay her for six
months, because she threatened to sue us for breach of contract.
The next that I procured was a clever person enough, and not
wanting in good manners, but she ordered the servants about as if
the house belonged to her, and of course they resented it. So did I.
Emily's gentle unobtrusiveness had spoiled us for ways of that sort.
Moreover, Miss Scott was terribly severe upon Lily; the child was
always in tears over lessons that were too hard for her. I did not
believe in overstraining a growing girl, and ventured to remonstrate
now and then on her behalf; but Miss Scott was quite above taking
advice from her elders and betters—as good as asked me to mind
my own business, or, at any rate, to allow her to know hers. So I
thought it best to make a change.
And then I was deceived by false representations into engaging a
widow lady, who had seen better days. She was recommended to
me as an experienced teacher, having held situations in high families
before her marriage; and I naturally supposed that one who had
been a mother herself would be a safer guide for a young girl than
one who had not. But words cannot describe what a wretch that
woman was. There is something about widows—I don't know what it
is—something that seems almost improper—especially those that are
by way of being young and pretty, like Mrs. Underwood, though she
was all forty, if she was a day, in spite of her baby airs and graces
and her butter-yellow hair. She had the audacity to try and flirt with
Tom, under cover of her pathetic stories of her lost husband and
children, and those better days that were a pure invention; and he
was too idiotically stupid—that is, too innocent and simple-minded—
to see what was so glaringly transparent to everybody else. He used
to think her an ill-used woman and pity her, and think me hard and
unfeeling because I didn't. Oh, never will I have a widow about my
house again! She entirely destroyed our domestic peace. Things
came to such a pass, indeed, that Tom even threatened—seriously,
and not in a joke—to get out his captain's certificate and return to
sea, because his home, that had always been so happy, had become
unbearable.
She went at last, and then I felt that I had had enough of
governesses. Determined that I would never undergo such misery
again, and at the same time strongly objecting to boarding-schools
for girls, there was nothing for it but to superintend Lily's general
studies myself, and take her into town for special lessons. I did not
like the job, and found her very tiresome and disheartening; she
seemed to mope, all alone, and would not interest herself in
anything. A girl in these days is never satisfied with her mother for a
companion, and after a time, when the Jukes were settled in their
Melbourne house, I was glad to let her go on long visits to her sister.
There she found plenty to occupy and amuse her, while I sat solitary
at home, working for them both.
For I had no children left when she was away. The difficulty of the
governess was not the only trouble that resulted from Emily's
desertion of me. Harry also forsook the nest. He said it was
inconvenient to live so far from his office, though he had never
thought of that while she was with us, and that it would be better
for business reasons to have a lodging in town. I did not attempt to
thwart him. And so, as soon as he was strong enough to return to
regular work—so valued was he by the shipping firm which
employed him that they had kept his situation open during his illness
—he took himself and a new bicycle to a stuffy Melbourne suburb,
where he would be in the way of meeting his beloved frequently at
the houses of her friends.
I wanted to settle in Melbourne too, to be near them all. But our
little place was our own—a valuable property, yet unsaleable in these
bad times—and Tom said we could not afford it. Besides, I knew he
would be miserable cooped up in streets, and lost without his pigs
and vegetable garden.
Thus we felt ourselves stranded on the shore while our young ones
put to sea—deserted in our old age—which, after all, is the common
fate. Only we were not in our old age, either of us. I have not a grey
hair in my head, even now, and have more than once been taken for
Phyllis's elder sister. On the day that she was married, when I wore
pale heliotrope relieved with white, I overheard old Captain
Saunders—and a man of eighty ought to be a judge—say to Mr.
Welshman, "She's a pretty girl, but her mother can beat her." And I
should like to see the man of forty who is the equal of what my
husband was at fifty-five—or is at his "present-day" age, which
comes to little more. Tom is stout certainly, but only in a dignified
and commanding fashion; he can out-do Harry in feats of strength,
and his fine, bronzed face, with those keen blue eyes in it, has a
power of manliness that kings might envy. For the matter of that,
kings are not nearly so much of kings as he was accustomed to
being on board his ships. I know the lady passengers made
themselves ridiculous by the way they scrambled for his notice and a
seat beside him at the saloon table.
To people like Mrs. Underwood, though she was really my
contemporary, I may seem very passée—no doubt I do—and a
perfect granny to the children, who regard youth and beauty as
solely the prerogatives of bread-and-butter misses in their teens; but
—as Captain Saunders's remark indicated—I am not too old to
charm where I want to charm. No, indeed; nor ever shall be—to one
person, at all events. When Tom and I woke up on our silver
wedding morning and kissed each other, did we not know what love
meant as much and more than we had ever done, without needing
Juke and Phyllis, and Harry and his Emily to teach us? I should think
so, indeed! It seems to me that it requires the fulness of many
years, fatherhood and motherhood in all stages and phases,
innumerable steps of painful experience climbed together, to bring
us to the perfect comprehension of love—the best love—that love in
the lore of which those children, who think themselves so knowing,
are mere beginners, with the alphabet to learn.
And this, by the way—it has just this moment occurred to me—is the
kernel of the woman question, which seems so vastly complicated.
Why, it is as simple as it can possibly be. The whole thing is in a
nutshell. Those advocates and defenders of this and that, arguing so
passionately and inconclusively at such interminable length—how
silly they are! You have one set of people raving for female suffrage
and equal rights and liberties with tyrant man; you have another set
of people storming at them for thus ignoring the intentions of
Nature, the interests of the house and family. The intentions of
Nature, indeed! The house and family! When millions of poor women
are old maids who haven't chosen to be so!—who, of course, could
not choose to be so, unless physiologically defective in some way or
another. Poor, poor things! They don't want equal rights with man,
but equal rights with the lower animals. As they don't know what
they miss, they may be forgiven for the way they speak of it in their
books and speeches; but if they had it—if all had it who by nature
are entitled to it—there would be no more woman question. I am
quite convinced of that. Nature's intentions would then really be
fulfilled, and the other troubles of the case, all secondary and
contingent, would vanish. Of course they would. Man is not a tyrant,
bless him! The child is the only tyrant—the legitimate power that
keeps woman in her place.
But, oh, how much that child does cost us! We give all freely, and
would give a thousand times more if we had it to give, for it is the
most precious of human privileges—the thing we really live for,
though it is inconvenient to admit it; but we pay with heart's blood,
from the beginning to the end. We pay so much and so constantly
that it often seems to me that the poor childless ones, undeveloped
and inexperienced, who cannot know the great joys of life, are also
exempt from all sorrow that is worthy of the name.
Baby-rearing, absorbingly interesting though it be, is really a terrible
business; and the fewer the babies the worse it is. You hardly know
what it means to have a night's rest for dread of the ever-recurring
epidemics that so fatally ravage the nurseries of this country. Day
and night you have the shadow of the clinical thermometer, your
sword of Damocles, hanging over you, and are afraid to breathe lest
you should bring it down. Then, when this hair-whitening strain
begins to slacken a little and you think you are going to have an
easy time, the children that are now able to take care of themselves
utterly refuse to do so. Your girl goes wet-footed with a light heart,
and you never see a telegraph messenger coming to the house
without expecting to hear that your boy at school has broken his
arm at football or his neck bird's-nesting. They follow their
mischievous devices, and you can't help it; you can only cluck and
fuss like a futile hen running round the pond in which her brood of
ducklings is splashing. That's worse than baby-rearing, because you
can at least do what you like with a baby.
And then, when you pride yourself on having successfully got
through the long struggle, and you tell yourself that now they are
going to be a help and a comfort to you at last, off they go to the
first stranger who beckons to them, and think no more about you
than of an old nurse who has served her purpose—probably turning
round to point out the errors you have committed, and to show you
how much better you would have done if you had taken their advice.
And that is worst of all.
No trouble that I had had with mine, while they were with me,
equalled the trouble of being without them, especially on the silver
wedding morning, when I had, as it were, the field of my married
life before me; when I felt that a golden harvest was my due, and
beheld a ravaged garden with all its flowers plucked. It was my own
fault that no letters of congratulation came by the first post; I had
purposely refrained from reminding the children of the approaching
anniversary, just to see if they would remember it, and they had
been too full of their own concerns to give it a thought. Afterwards
they scolded me for not telling them, and were very repentant. I had
no present either—that is, not on the day. Tom had given me a silver
entrée dish, and I had given him a silver-mounted claret-jug; but we
had made our purchases a week too soon, and had been unable to
keep the matter secret from each other. It was a wet morning, and
I, being the first downstairs, was greeted with the smell of burnt
porridge in the kitchen. I thought it too bad of Jane to let such a
thing happen on such an occasion, and a hardship that rain should
be running like tears down the breakfast-room window panes when I
so particularly wanted to be cheered. It was April, the month of
broken weather, and leaves were falling thickly on the beds and
paths outside. I surveyed the dripping prospect, and noted how
impossible it was to keep the weeds down, with the summer-
warmed earth so moist; and I turned back into the room to see a
late-lit fire fading on the hearth, and the children's empty chairs
against the wall.
Well, I sat down behind the two lonely tea-cups and bowed my head
on the table, on the point of tears—feeling that I too was a denuded
autumn tree, an outworn woman who had had her day. And then,
before I could get out my handkerchief, Tom came in.
He kicked two logs together, and the dying fire sprang to life; he
opened a window, and the freshest and sweetest morning air poured
in, sprinkled with a gentle shower and hinting at coming sunshine.
"What a lovely day we've got, eh, Polly? What a beautiful rain! This'll
bring the grass on, and make the land splendid for ploughing, hey?
What's the matter, old girl? Missing the children? Oh, well, they're
happy; we've nothing to fret about on their account—nor on our own
either—and that's more than most people can say on their silver
wedding morning. Porridge spoilt? Oh, that's no matter—we have
something better than porridge. Here, Jane! Jane! Bring in the you
know what, if you've got 'em ready."
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like