52 Chapter 3 Semantic Partitions and Very Large Database VLDB Support.. Of particular interest are details about newfeatures such as semantic partitions, computed columns, functionindexe
Trang 2Larry EllisonCEO, Oracle Inc.
Trang 4The Official New
with Mark A Shelton and Jagan Reddy
Wordware Publishing, Inc.
Trang 5The official new features guide to Sybase ASE 15 / by Brian Taylor [et al.].
© 2006, Wordware Publishing, Inc.
All Rights Reserved
2320 Los Rios Boulevard Plano, Texas 75074
No part of this book may be reproduced in any form or by any means
without permission in writing from Wordware Publishing, Inc.
Printed in the United States of America
This book is sold as is, without warranty of any kind, either express or implied, respecting the contents of this book and any disks or programs that may accompany it, including but not limited to implied warranties for the book’s quality, performance, merchantability, or fitness for any particular purpose Neither Wordware Publishing, Inc nor its dealers or distributors shall be liable to the purchaser or any other person or entity with respect to any liability, loss, or damage caused or alleged to have been caused directly or indirectly by this book Portions of this book contain charts, graphs, tables, and other materials that are copyrighted by Sybase, Inc., and are used with permission.
All inquiries for volume purchases of this book should be addressed to Wordware Publishing, Inc.,
at the above address Telephone inquiries may be made by calling:
(972) 423-0090
Trang 6SYBASE DISCLAIMS ANY LIABILITY FOR INACCURACIES,MISINFORMATION, OR ANY CONTENT CONTAINED IN, ORLEFT OUT OF THIS BOOK.
Trang 8To my family, tons! — BRT
To Karen, Mom, and Dad — NA
To my best friend and wife, Carol — SWB
To my boys — CKT
vii
Trang 10Foreword xix
Acknowledgments xxi
About the Authors xxv
Introduction xxvii
Part I: New Features Overview Chapter 1 Exploring the Sybase Galaxy 3
Part I — New Features Overview 4
System Maintenance Improvements 4
Partition Management — Semantic Partitions 5
Scrollable Cursors 5
Overview of Changes to Query Processing 6
Detection and Resolution of Performance Issues in Queries 6
Computed Columns 7
Functional Indexes 7
Capturing Query Processing Metrics 8
Plan Viewer 9
Sybase Software Asset Management (SySAM) 2.0 9
Installation of ASE 15 9
Part II — Pre-15 Improvements 10
Multiple tempdb Databases 10
MDA Tables 10
Java and XML 11
The Appendices 11
Sample Certification Exam 11
Use Cases 11
3, 2, 1, Contact! 12
Chapter 2 System Maintenance Improvements 13
Recent Pre-ASE 15 Improvements 13
Multiple tempdb 14
Native Data Encryption/Security Enhancements 14
Automatic Database Expansion 15
The Basics 16
Job Scheduler 18
Basic Components 18
Installation of Job Scheduler 18
ASE 15 Improvements 19
ix
Trang 11Row Locked System Catalogs 19
Update Statistics 20
Updates to Partition Statistics 20
Automatic Update Statistics 22
Datachange 22
Why Use datachange? 27
Datachange, Semantic Partitions, and Maintenance Schedules 28 Local Indexes 31
Benefits 31
sp_helpindex 32
Partition-level Utilities 33
Partition Configuration Parameters 34
Utility Benefits from Semantic Partitions 35
Partition-specific Database Consistency Checks (dbccs) 35
Reorg Partitions 38
Changes to the bcp Utility 39
Truncate Partitions 43
Very Large Storage System 44
Disk Init 45
Large Identifiers 45
Long Identifiers 46
Short Identifiers 46
Unicode Text Support 47
New Datatypes 47
New Functions 48
Deprecated Functions 50
New Configuration Parameters 51
Eliminated Configuration Parameters 52
New Global Variables 52
Summary 52
Chapter 3 Semantic Partitions and Very Large Database (VLDB) Support 53
Introduction 53
Why Partition Data? 55
Benefits of Partitioning 56
Partition Terminology 57
Semantic Partitions 61
Configuring ASE for Semantic Partitioning 62
Partition Support in ASE 15 63
Partition Types 64
Range Partitioning 65
Hash Partitioning 70
List Partitioning 75
Round-robin Partitioning 78
x
Trang 12Partitioning Strategies 83
Inserting, Updating, and Deleting Data in Partitions 84
Inserting Data into Semantic Partitions 84
Inserting Data into Range Partitions 84
Inserting Data into Hash Partitions 86
Inserting Data into List Partitions 86
Deleting Data from All Semantic Partitions 86
Updating Data in All Semantic Partitions 86
Built-in Functions 87
Data Partition Implementation and Upgrade Strategies 89
Index Partitioning 93
Local Index 94
Clustered Prefixed Index on Range Partitioned Table 95
Clustered Non-Prefixed Index on Range Partitioned Table 97
Clustered Prefixed Index on List Partitioned Table 99
Clustered Non-Prefixed Index on List Partitioned Table 101
Clustered Prefixed Index on Round-robin Partitioned Table 104
Clustered Non-Prefixed Index on Round-robin Partitioned Table 106
Clustered Non-Prefixed Index on Hash Partitioned Table 108
Clustered Prefixed Index on Hash Partitioned Table 110
Global Index 113
Global Nonclustered Prefixed Index on Range Partitioned Table 114
Global Nonclustered Prefixed Index on List Partitioned Table 116
Global Nonclustered Prefixed Index on Round-robin Partitioned Table 118
Global Nonclustered Prefixed Index on Hash Partitioned Table 120
Query Processor and Partition Support 122
ASE 15 Optimizer 124
Partition Maintenance 124
Altering Data Partitions 124
Unpartition a Table 125
Change the Number of Partitions 126
Add a Partition to a Table 126
Drop Partitions 130
Modifications to the Partition Key 131
Partition Information 134
xi
Trang 13Influence of Partitioning on DBA Activities 143
Influence of Partitioning on Long-time Archival 143
Summary 144
Chapter 4 Scrollable Cursors 145
Introduction 145
Scrollable Cursor Background 146
Cursor Scrollability 146
Cursor-related Global Variables 148
Changes to the sp_cursorinfo System Procedure 150
Be Aware of Scrollable Cursor Rules! 151
Cursor Sensitivity 152
Demonstration 1: Update to a Row Already Fetched 154
Demonstration 2: Update to a Row Not Yet Fetched 156
Cursor Sensitivity — An Exception 157
Locking Considerations with Cursors 158
Impact on tempdb Usage 159
Worktable Materialization with Scrollable Sensitive Cursors 160
Conclusion of Sensitive vs Insensitive Cursors 163
Sybase Engineer’s Insight 164
Summary 164
Future Direction 165
Chapter 5 Overview of Changes to the Query Processing Engine 167
Introduction 167
Optimization Goals 168
allrows_oltp 168
allrows_mix 169
allrows_dss 169
Determining the Current Optimization Goal 170
Optimization Criteria 170
merge_join 171
merge_union_all 171
merge_union_distinct 171
multi_table_store_ind 171
opportunistic_distinct_view 171
parallel_query 171
hash_join 172
Optimization Timeout Limit 172
Query Processor Improvements 174
Datatype Mismatch 175
Partition Elimination and Directed Joins 177
Tables with Highly Skewed Histogram Values 179
Group By and Order By 181 xii
Trang 14or Queries 182
Star Queries 182
Summary 185
Chapter 6 Detection and Resolution of Query Performance Issues 187
Introduction 187
An Approach to Poor Query Performance Diagnosis 188
Common Query Performance Factors 190
Eliminating Causes for Sub-Optimal Plan Selection 191
Find Missing or Invalid Statistics 191
Consider Range Cell Density on Non-Unique Indexes 191
Identify Index Needs 192
Identify Poor Index Strategy 192
Fragmentation of Data 192
Resolve Partition Imbalance 193
Reset Server- or Session-level Options 193
Overengineered Forceplan 194
Invalid Use of Index Force 194
Inefficient Query Plan Forced by Abstract Plan 195
Query Processor “set options” — The Basics 195
Query Optimizer Cost Algorithm 198
ASE 15 vs 12.5.x Cost Algorithm 199
Query Processor “set options” — Explored 200
show_missing_stats 200
show_elimination 203
show_abstract_plan 204
Why Use Abstract Plans for ASE 15? 207
Application of Optimization Tools 208
Optimization Goal Performance Analysis 208
Optimization Criteria Performance Analysis 210
Optimization Timeout Analysis 212
Suggested Approach to Fix Optimization Timeout Problems 216
Detection, Resolution, and Prevention of Partition-related Performance Issues 217
Data Skew Due to Incorrect Partition Type or Poor Partition Key Selection 218
Effect of Invalid Statistics on Table Semantically Partitioned 220
Summary 223
Chapter 7 Computed Columns 225
Introduction 225
Key Concepts 226
Materialization 226
xiii
Trang 15Deterministic Property 228
Relationship between Deterministic Property and Materialization 229
Deterministic and Materialized Computed Columns 229
Deterministic and Nonmaterialized Computed Columns 229
Nondeterministic and Materialized Computed Columns 230
Nondeterministic and Nonmaterialized Computed Columns 230
Benefits of Using Computed Columns 231
Provide Shorthand and Indexing for an Expression 231
Composing and Decomposing Datatypes 231
User-defined Sort Order 232
Rules and Properties of Computed Columns 233
Sybase Enhancements to Support Computed Columns 235
Create Table Syntax Change 235
Alter Table Syntax Change 235
System Table Changes 236
Stored Procedure Changes 237
Summary 239
Chapter 8 Functional Indexes 241
Computed Column Index 242
Purpose 242
Rules and Properties of a Computed Column Index 246
Feature Benefits 246
Feature Limitations 248
Impacts to tempdb 248
Impact to Existing Application Code 249
Determining When to Use a Computed Column Index 250
Optimizer Statistics 251
Function-based Index 251
Purpose 251
Rules and Properties of a Function-based Index 252
Feature Benefits 253
Feature Limitations 256
Impacts to tempdb 256
Impact to Existing Application Code 257
Determining the Use of a Function-based Index 257
Optimizer Statistics 258
Behind the Scenes 258
Getting Index Information 258
Summary 259
xiv
Trang 16Chapter 9 Capturing Query Processing Metrics 261
Alternatives to Query Processing Metrics 261
Introduction to Query Processing Metrics 262
Contents of sysquerymetrics 263
Contents of the sysquerymetrics View 264
How to Enable QP Metrics Capture 265
Captured Information Explored 266
Stored Procedures 266
Triggers and Views 270
Execute Immediate 270
Accessing Captured Plans 271
How Is the QP Metrics Information Useful? 273
Identification of Performance Regression 276
Comparing Metrics for a Specific Query between Running Groups 277
Comparing Metrics for All Queries between Running Groups 279
Why Separate the QP Metrics Data by gid? 280
Syntax Style Matters; Spacing Does Not 281
Clearing and Saving the Metrics 283
Relationship between Stats I/O and QP Metrics I/O Counts 284
Information for Resource Governor 285
Space Utilization Considerations 285
Limitations 286
Summary 286
Chapter 10 Graphical Plan Viewer 287
Graphical Plan Viewer from Interactive SQL 287
Graphical Query Tree Using Set Options 294
Summary 296
Chapter 11 Sybase Software Asset Management (SySAM) 2.0 297
Introduction 297
Prior to ASE 15 298
With ASE 15 299
Components of Asset Management 299
SySAM Server 299
SySAM Utility Program — lmutil 300
SySAM Reporting Tool 300
System Environment Variables 301
License File 302
Options File 303
Properties File 303
The SySAM Environment 304
Standalone License Server 304
xv
Trang 17Networked License Server 305
Redundant License Server 305
Acquiring Product Licenses 306
Product Licenses 309
Try and Buy 309
License Activation 309
SySAM Administration 310
sp_lmconfig 310
ASE 15 SySAM Upgrade Process 312
SySAM Reporting 313
Summary Reports 313
Server Usage Reports 319
Raw Data Reports 320
Summary 321
Chapter 12 Installation of ASE Servers 323
Prior to Installation for All Methods 324
Installation with Resource Files 325
Notes for Resource File Installation of ASE 325
Installation of ASE Components with a Resource File 330
GUI Installation Method with srvbuild Executable 332
Installation with the Dataserver Executable 352
Summary 356
Part II: Pre-15 Improvements Chapter 13 Multiple Temporary Databases 359
Introduction 359
Purposes for Multiple Temporary Databases 360
Prior to ASE 15 360
With ASE 15 361
System Catalog Changes 361
directio Support 361
update statistics 363
Insensitive Scrollable Cursors 364
Semi-sensitive Scrollable Cursors 364
Sensitive Scrollable Cursors 364
How to Decide When to Add a Temporary Database 365
Strategies 365
What Are Your Needs? 366
Implementation Steps 367
Determining Available Temporary Databases 368
Sample Setup for Temporary Database for “sa” Use Only 369
Other Issues 371 xvi
Trang 18Dropping Temporary Databases 371
Altering a Temporary Database 372
@@tempdb 372
Summary 372
Chapter 14 The MDA Tables 373
What Are the MDA Tables? 373
Past Solutions 374
MDA Table Installation 376
MDA Table Server Configuration Options 377
The Parent Switch 379
The MDA Tables 380
Changes from ASE 12.5.3 382
What Is Meant by “stateful” Tables? 383
Stateful MDA Table Data Management 385
SQL Use 391
Useful MDA Table Queries 391
MDA Alternatives 393
Summary 393
Chapter 15 Java, XML, and Web Services in ASE 395
Introduction 396
Java in the Database 396
Installing Java Classes 397
Creating Java Classes and JARs 397
Using the installjava Utility 398
Configuring Memory for Java in the Database 398
Java Classes as Datatypes 399
An Example of Table Definition Using a Java Class 400
Performance Considerations 400
An Example of Using a Java Class within a Select 400
Executing Java Methods 400
Class Static Variables 401
Recommendations and Considerations 401
XML in the Database 402
XML Stored in the Database 402
Option 1: Store the XML Document into a Text Datatype 403
Option 2: Store the XML Document into an Image Datatype Using xmlparse 404
Option 3: Store the XML Document into an Image Datatype Using Compression 404
Option 4: Store the XML Document Outside the Database 405
HTML Stored in the Database 406
xvii
Trang 19Recommendations and Considerations 406
Performance and Sizing 407
SQL Result Sets Converted to Return an XML Document 410
Web Services 411
Web Services Producer 411
Web Services Consumer 413
Recommendations and Considerations 415
Appendix A Sybase ASE 15 Certification Sample Questions and Answers 417
Appendix B Use Cases 447
Index 467
xviii
Trang 20Sybase Adaptive Server Enterprise (ASE) has been a leading
RDBMS for mission-critical applications for almost two decades.With ASE 15, Sybase has continued the tradition of introducingleading edge database technologies to address our customers’ needs.These technologies cover security, unstructured data management,and operational intelligence ASE 15 provides significant improve-ments for DSS and OLTP applications thanks to innovative queryprocessing technology The result is a clear understanding of the opti-mal usage of the features and functionality
The Official New Features Guide to Sybase ASE 15 is the first
book describing ASE 15 Of particular interest are details about newfeatures such as semantic partitions, computed columns, functionindexes, and scrollable cursors The book is valuable also for its guid-ance for diagnosing, resolving, and optimizing the overall systemperformance
The authors collectively have more than 40 years of experiencewith Sybase ASE as DBAs at some of Sybase’s largest and mostdemanding customers Their background has enabled them to create
a book with great practical value
The authors’ material is presented in a way that is useful to
read-ers independent of their experience level with ASE The Official New
Features Guide to Sybase ASE 15 will be an invaluable asset to
DBAs, developers, and consultants working with Sybase ASE
Dr Raj NathanSenior Vice PresidentInformation Technology Solutions GroupSybase, Inc
xix
Trang 22The authors would like to thank Celeste Noren for starting this wholeprocess Your continual support and upbeat attitude have allowed us
to stay focused on the job at hand We thank Joe Pearl for his tirelessand thorough editing and brilliant input Special thanks to Irfan Khan
at Sybase Engineering for providing us with early access to the newfeatures and documentation for ASE 15 We need to thank
Rob Verschoor, Mark Kusma, and Jeff Tallman of Sybase for theirthorough technical reviews and timely feedback We thank JoanFronske and Tom Traubitz from Sybase Marketing for making allthe arrangements with Sybase We would like to thank Tim McEvoy
at Wordware Publishing for getting this book put together in such atimely manner A special thanks goes to Dean Kent for his legalcounsel during the process and for all the good lunches Mostly,
we would like to thank our families for being understanding andgracious
xxi
Trang 23I would like to start by recognizing the talented and dedicated group
of authors — Steve Bradley, Naresh Adurty, and Carrie King Taylor
— who accepted my challenge to create this book about the new tures for Sybase ASE 15 With all of the personal challenges andcommitments we each faced during the development of this book,I’m even more pleased with the final product As our careers diverge
fea-in the future, I’m sure each of us will fondly recall the many lenges, good times, and late nights spent on the development of thisbook
chal-Next, I want to personally thank the many Sybase employeeswho helped with this book in many capacities: Celeste Noren, JoePearl, Rob Verschoor, Irfan Khan, Jeff Tallman, Mark Kusma, JoanFronske, and Tom Traubitz
I also need to thank the many friends and family members in mylife: my parents, Art and Nancy, my brother, Grant, Aunt Soozie,Frank, Carol, and my grandfather Robert Taylor, who left this worldduring the writing of this book I also want to thank some of myfriends who have made life very interesting and with whom I haveshared many of life’s milestones: Steve, Daryl, Dave, Chris, andMike
I owe the biggest thanks to my family, especially my wife andco-author, Carrie I appreciate how you are able to keep me moti-vated, and still find time for our boys and your contributions to thisbook You are the reason and motivation for my success I sure loveyou! I also owe many great big hugs and kisses to my two big boys,Elliot and Jonah, for giving up their daddy for many weekends andnights Each of you did your best to remind me of how important it is
to spend quality time with family, despite the many demands ofauthorship
— BRT
First, I would like to thank Brian for considering me talented enough
to be a contributing author and my poor judgment that made meagree to his request When Brian approached me with this idea, I hadjust been married for a month to my wonderful and nạve wife,Karen, and was about to start my Executive MBA from Duke, forwhich I had to fly from Florida to Raleigh every other weekend Mymind envisioned mansions and big boats following the success of thisxxii
Trang 24book After talking to the publisher, I realized that we will not beanywhere close to buying a boat We will be lucky to be able to buy alife jacket with the new riches By that time, it was too late to say no.
I would like to thank Karen for supporting me, at least outwardly,throughout this madness; my parents, for giving me the freedom andcourage to make insane decisions and for constantly reminding methat I am the cutest kid in the world and thus stroking my fragile ego;and my failed stand-up comedy career, which forced me to continue
my career as a Sybase DBA for the past decade
— NA
First, I would like to thank Brian for taking on this initiative and sidering me to be an author in developing this work Second, I wouldlike to thank the other authors for the time and patience that each ofyou have shown during this process As difficult as it is for one per-son to produce such a work, four people can make it even morestrenuous Thank you, guys, for keeping the process lighthearted andfun It was a pleasure working with you I would like to thank myparents, Charlie and Betty, for instilling in me the desire and pride to
con-do the best I can in whatever I attempt And most importantly, Iwould like to thank my best friend for all of her support during thistime — my wife and my love, Carol
— SWB
I would like to recognize my co-authors Brian, Naresh, and Steve.You guys rock Special thanks go to Carol and Karen for sacrificingyour family time so we could complete this book I’d like to
acknowledge my dad (posthumously), my mom, and my siblings(“The Chills”…eyes loaf) for making me the person I am today.Without them, I might have turned out ordinary A special thanks to
my friends Linda, Katrina, Colleen, Gina, Heather, Chris, Daryl,Terri, Allie, and September for providing so much fun and inspirationduring this process Most importantly, I’d like to thank my husband,Brian, and wonderful sons, Elliot and Jonah You are the lights of mylife I love you more, more, more, more, more!
— CKT
xxiii
Trang 26Brian Taylor is a Sybase Certified Professional DBA
with over 11 years of experience in the Information nology (IT) industry Brian has been a presenter at theSybase TechWave conference He has also presented anASE 15 case study through a live web seminar, as well asdelivered web seminars based on his beta testing effortswith ASE 15 He is a contributing author to Wordware’s
Tech-Administrator’s Guide to Sybase ASE 12.5 Brian has a
BS in management information systems and finance fromFlorida State University and is currently pursuing hisMBA from Florida State University
Naresh Adurty has been working with Sybase for the
past 12 years He has an MS in mechanical engineeringfrom Oklahoma State University and is currently pursuinghis MBA from Duke’s Fuqua School of Business He isalso a professional stand-up comedian with radio and TVcredits including HBO
Steve Bradley is a Brainbench Certified Sybase DBA
with over 25 years of experience in the IT field in theareas of data center operations, application develop-ment, MVS administration, database administration,and vendor technical sales support Steve has workedwith Sybase products for over 12 years and has been apresenter at the 2004 and 2005 Sybase TechWave con-ferences Steve has a BS in computer science from theUniversity of South Carolina and an MBA from Uni-versity of Phoenix, Tampa
xxv
Trang 27Carrie King Taylor has been working with Sybase as a
DBA for 8 years with over 15 years of experience in the
IT industry Carrie has a diverse IT background as she hasserved as a Unix systems administrator, software qualityanalyst, and software developer, and has worked in soft-ware configuration and implementation She has a BS inbusiness information systems from Indiana WesleyanUniversity
About the Contributing Authors
Mark A Shelton is an enterprise architect with Nielsen Media
Research He has more than 25 years of experience in the IT industryand has been working with Sybase technologies since 1993 His workpositions have included a DBA, developer, business analyst, projectmanager, and architect Mark holds a BS in computer science and a
BS in electrical engineering from the University of Dayton, and anMBA from the University of South Florida
Jagan Reddy is a certified professional senior DBA at America
Online, Inc (AOL) He has more than 15 years of database tration experience, and has been a presenter at the Sybase TechWaveconference He started using Sybase technologies in 1989 as a SybaseDBA He has spent most of his career as a DBA, project lead, andsystem administrator He holds a master’s degree in plant geneticsand plant breeding from Andhra Pradesh Agricultural University inIndia, and a master’s degree in computer science from Bowie StateUniversity in Maryland
adminis-xxvi
Trang 28We’ve read the newsgroups We’ve seen the blogs We know you’reout there The talented Sybase database administrators, developers,managers, and users are out there This book is for you.
We will attempt to guide you, the reader, through the ments of ASE 15 In addition to the enhancements, we will alsodiscuss how these enhancements can be applied to a “real-life” situa-tion We have polled many fellow database administrators about theirthoughts on Sybase ASE regarding the new features We have tried toincorporate as many of these ideas as possible
enhance-Audience
The audience for this book is wider than just database administrators.This book can be used by managers to foresee possible project direc-tion for more than just the next release of a product or application Itcan assist the system architect in determining the best solution forenterprise applications It can be used to educate the developer aboutfeatures that are now available that will make the development pro-
cess easier and more manageable But most importantly, this book is
for the database administrator This book will guide you through thepractical use of the new features in Sybase ASE 15
Scope
This book is an overview of the new features available in ASE 15
We also touch on some existing features that were implemented sincethe last series of administration guides was released These preexist-ing features were deemed worthy of reference based on the overallASE road map for future releases and the direction of Sybase toward
a flexible product geared toward service-oriented architecture (SOA)
We will demonstrate and clarify the new features and how they grate into existing systems
inte-xxvii
Trang 29This book follows certain typographic conventions, as outlinedbelow:
Arial font is used for commands, options, utility names, and
other keywords within the text
Italics is used to show generic variables and options; these
should be replaced when actually writing code
Constant width is used to show syntax, the contents of files, and
the output from commands
%, $ are used in some examples as the operating system
prompt[ ] surround optional elements in a description of syntax
(the brackets themselves should never be typed){ } indicates you must choose at least one of the
enclosed options( ) are part of the command
| is used in syntax descriptions to separate items for
which only one alternative may be chosen at a time, indicates as many of the options shown can be
selected but must be separated by commas
… indicates the previous option is repeatable
An example of these conventions is:
update statistics table_name
[[partition data_partition_name] [(column_list)] |
index_name [partition index_partition_name]]
[using step values]
[with consumers = consumers] [,sampling=N percent]
xxviii
Trang 30A final word about syntax: No capitalization of objects, databases, orlogins/user were used where syntax would be incorrect and wouldcause errors Sentences starting with keywords may start with
lowercase letters Code and output are presented separately from theregular paragraph
Disclaimer
Some of this material is based upon a prereleased version of ASE 15.Some of the details, syntax, and output of some of the commands andprocedures may differ slightly from the General Availability (GA)release of ASE 15
While the authors have attempted to ensure the screen shots,syntax, and output reflect the GA release of ASE 15, it is possible thebook may contain some information from the prereleased version ofASE 15, which may or may not be materially different from the GArelease of ASE 15
xxix
Trang 32New Features Overview
1
Trang 34Chapter 1
Exploring the Sybase Galaxy
The times, they are a-changin’ This observation applies to relationaldatabase management systems as well Historically, databases haverevolved around structured data and how it is managed The databaseadministrator must now look beyond managing structured data andmust now consider managing information
Sybase rightly code-named the latest release of Sybase AdaptiveServer Enterprise (ASE) “Galaxy.” We are moving beyond the world
of data management as we know it and rocketing into the new galaxy
of information management
What is the difference between data and information? Data issimply the atomic component of information, whereas information istaking the data and making it mean something As we begin to openour silos and release the data within, that data can then become usefulinformation to everyone in our individual galaxies
What does this mean to the database administrator? It means porting more complex queries for greater flexibility and operationalscalability It also means looking beyond our previous ideals of datastorage and broadening our concepts to the possibilities of largeramounts of data and faster access
sup-Let’s take a look at the new features available in ASE 15 as webegin to explore the galaxy of information management Addi-tionally, our journey will cover a few of the recent pre-ASE 15enhancements and explore how they enhance and expand the ASEproduct
Trang 35Part I — New Features Overview
Unlike previous releases, the release of ASE 15 incorporates ing changes to the ASE product Many of these changes are designed
sweep-to increase the database server’s ability sweep-to handle a high volume andwide variety of data while responding with greater velocity
Today’s database servers must have the ability to handle anincreasing load of information Database administrators are given theresponsibility of balancing the responsiveness of systems and theavailability of data ASE 15 concurrently assists the database admin-istrator with both of these often conflicting objectives
ASE 15 arrives with internal enhancements to keep data moving
at the highest possible velocity while minimizing the server’s needfor performance tweaks, thus lowering the total cost of ownership(TCO) Features such as automatically logged execution metricsassist the database administrator in lowering the cost of developmentwhile increasing the ability to address more complex data This chap-ter gives a brief overview of all of the new features of ASE 15
System Maintenance Improvements
To achieve the goals of simplifying the maintenance of ASE as well
as enhancing the performance of query processing, several systemmaintenance enhancements are introduced in the ASE 15 release.Included in these changes is the ability to automatically update statis-tics using thedatachangefunction in conjunction with Job
Scheduler, the expansion of row-level locking to system tables, andthe introduction of partition-based utilities and maintenance tools.The system administration enhancements in ASE 15 are designed
to lower the maintenance requirements of ASE, enabling the databaseadministrator to target maintenance efforts on areas of ASE that trulyneed attention Several of the changes allow the database administra-tor to reduce or altogether close the regularly scheduled maintenancewindows where full system maintenance is performed
Leading up to the ASE 15 release, many new features wereadded to the ASE 12.5.x versions of ASE that work hand in handwith the enhancements included in ASE 15 In Chapter 2, we discussthe following pre-ASE 15 topics: multiple tempdb, automatic data-base expansion, and the Job Scheduler, and how these features work
in conjunction with enhancements in ASE 15 to lower TCO
Trang 36Partition Management — Semantic Partitions
Sybase ASE semantic partitions address two main issues with today’sstorage systems: data velocity and data explosion Today, systemsdemand access to more data, and with increasing velocity Thesegoals are often contradictory The introduction of Sybase ASE 15semantic partitions simultaneously assists with each of these goalsthrough the physical separation of data into partitions
The storage of current and historic data in the same databaseadds to the data management complexities already inherent in mostenvironments Semantic partitions can decrease the difficulty of man-aging these complexities Semantic partitions provide a mechanismfor allowing access to this data through the same interface, with noextraneous processing modifications to retrieve archived or historicaldata Semantic partitions also introduce partition elimination Withsemantic partitions, the optimizer is able to choose which partitionsare necessary to resolve the query and therefore eliminate unneces-sary data access
The concept of data partitions is not new to Sybase ASE; ever, the concept of semantic partitions is new Semantic partitionsallow the database administrator to maintain control over the place-ment of partitioned data and indexes within the database This abilitywas not present in prior releases of Sybase ASE
how-Chapter 3 elaborates on the advantages provided by semanticpartitions Additionally, the chapter presents an approach to bestmatch the appropriate semantic partition type with a system’s dataand usage requirements The chapter specifies the differences
between partition types as well as the new terminology introduced insupport of this new functionality
Scrollable Cursors
Scrollable cursors are in line with Sybase’s goal to increasingly lowerthe TCO of Sybase ASE Scrollable cursors can also ease or speedthe development process by replacing supplemental middleware orclient tools used to manipulate a cached result set
Chapter 4 describes how to create a scrollable cursor, explainshow to manipulate a scrollable cursor, and discusses the global vari-ables associated with a scrollable cursor
Trang 37Additionally, Sybase ASE 15 introduces cursor sensitivity sor sensitivity relates to the ability of ASE to allow changes to dataunderlying a cursor to be represented in the cursor’s result set Cursorsensitivity also allows for a cursor performance benefit, which isexplained within this chapter.
Cur-Overview of Changes to Query Processing
In ASE 15, the Query Optimizer has undergone numerous internalchanges These changes are intended to accomplish the followingobjectives:
t Improve query performance
t Limit the need for manual intervention to achieve optimal queryplans
t Ease the monitoring and diagnostic efforts needed to maintainquery performance
Chapter 5 discusses the “out-of-the-box” improvements to the ASE
15 Query Optimizer These Query Optimizer changes will lowerTCO by requiring less tuning By simply running existing queriesthrough the new Query Optimizer, the performance can be improved.Additionally, new optimization goals are explored in conjunctionwith the optimization time limitations These time limitations willprovide the database administrator the ability to specify the percent-age of time the Query Optimizer is allowed to spend on query
in little or no manual intervention for the query processor to arrive atthe most efficient query plan
To accomplish these goals in ASE 15, the Query Optimizer andoptimizer toolset have undergone numerous changes to accommodatethe demand for simplified detection and resolution of problems A
Trang 38new set of optimizer diagnostic tools for the database administrator isincluded in this release of ASE Chapter 6 discusses how to enablethese new diagnostics This chapter also defines the diagnostics andoffers insight into how the database administrator can use the newdiagnostics to detect query-level problems A specific problem reso-lution slant involving diagnostic examples with use of the new ASE
15 features, most specifically semantic partitions, is representedthrough example
It is also important to note that the name of the optimizer is nowoften referred to as the “query processor” and equally as often as the
“Query Optimizer.” This is a departure from the normal reference tothe “Optimizer” as represented in prior versions of ASE
Computed Columns
In accordance with the Sybase road map to provide operational lence within the database, ASE 15 introduces computed columns.The implementation of computed columns affords the databaseadministrator the opportunity to ease development costs and provide
excel-a foundexcel-ation to offer increexcel-ased dexcel-atexcel-a velocity
The utilization of computed columns can reduce TCO by fying the application development effort The simplification isaccomplished by the placement of the computational burden on theserver as opposed to within the client layer This enhancement isespecially applicable to the handling of unstructured data, such asXML documents
simpli-Chapter 7 provides the technical details on the implementation ofcomputed columns The chapter outlines the syntax to implementcomputed columns and includes several examples Materializationand the deterministic properties of computed columns are alsoexplained
Functional Indexes
Sybase offers computed column indexes and function-based indexes
to maximize the scalability and performance capabilities of SybaseASE These new index types allow Sybase ASE to maintain indexesbased on derived data This enhancement further emphasizes the datavelocity initiatives incorporated into the release of ASE 15
Trang 39Function-based indexes provide the database administrator anadditional tool to improve the performance of application logic whilereducing TCO As a DBA, when faced with optimization scenariosfor queries issued from the application, previous solutions were tomodify the application code or upgrade the underlying hardware.ASE 15 provides the ability to optimize application code with theaddition of function-based indexes to the database These perfor-mance-enhancing indexes can be applied without the impact ofapplication maintenance or hardware upgrades.
The underlying benefit of function-based indexes and computedcolumn indexes is the reduction of physical and logical I/O necessary
to satisfy queries A reduction in physical and logical I/O allows ASE
to maintain performance as the storage requirements of databasesincrease This provides greater flexibility to the database administra-tor for managing data explosion
Chapter 8 provides details on how to implement functionalindexes The chapter provides guidelines on when to implement thesenew features as well as provides an analysis of the impact andlimitations
Capturing Query Processing Metrics
As database administrators, we are often asked to scrutinize the formance of queries As an initial diagnostic step, many databaseadministrators examine the statistics I/O or statistics time outputassociated with a query While the statistics I/O and time outputprovide initial information on a track to take to diagnose query per-formance, basic information is often lacking (for example, baselineperformance for the specific query) The Query Processing Metricscapture process provides a mechanism to maintain a query baselinewith minimal setup or maintenance effort
per-In Chapter 9 we demonstrate the setup and value of the QueryProcessing Metrics capture process as well as specifically identifywhat and where information is maintained by the metrics captureprocess
This feature is in line with the Sybase goal to increasingly lowerthe TCO of Sybase ASE The Query Processing Metrics can supple-ment or replace third-party tools designed to capture the SQL
executed against ASE installations
Trang 40Plan Viewer
The introduction of the Plan Viewer in ASE 15 is aligned withSybase’s goal to ease the overall management needs of ASE ThePlan Viewer is a graphical user interface (GUI) utility wrapped in theinteractive ISQL tool included with the ASE 15 open client product.This new feature provides database administrators and developers atool to help visualize query plans for the purpose of quick and easyidentification of performance issues
Chapter 10 provides instructions on how to set up and launch thePlan Viewer The chapter continues with a demonstration on how toextract useful information from the Plan Viewer, and discusses theinformation and concepts contained in the Plan Viewer’s output
Sybase Software Asset Management
(SySAM) 2.0
In conjunction with the release of ASE 15, Sybase provides a newversion of the Sybase Software Asset Management (SySAM).SySAM 2.0 provides a mechanism for Sybase to ensure customercompliance with license agreements For most customers, the ques-
tion is not “Should we monitor for compliance?” but “How do we
monitor for compliance?” SySAM 2.0 provides the capability ofmonitoring and reporting license compliance, which is required forASE 15
In Chapter 11, SySAM 2.0 is explored in detail The components
of the Sybase Software Asset Management are explained, as well asthe various setup options, evaluation licenses, and grace periods
Installation of ASE 15
The focus in Chapter 12 is the installation of ASE 15 This chapterprovides an overview of the server installation process, using threedistinctly different installation methods With each method, serverinstallation is covered in an easy-to-follow step-by-step manner