Foreword |
|
xix | |
Acknowledgments |
|
xxi | |
About the Authors |
|
xxv | |
Introduction |
|
xxvii | |
|
Part I: New Features Overview |
|
|
|
Exploring the Sybase Galaxy |
|
|
3 | (10) |
|
Part I --- New Features Overview |
|
|
4 | (6) |
|
System Maintenance Improvements |
|
|
4 | (1) |
|
Partition Management --- Semantic Partitions |
|
|
5 | (1) |
|
|
5 | (1) |
|
Overview of Changes to Query Processing |
|
|
6 | (1) |
|
Detection and Resolution of Performance Issues in Queries |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
Capturing Query Processing Metrics |
|
|
8 | (1) |
|
|
9 | (1) |
|
Sybase Software Asset Management (SySAM) 2.0 |
|
|
9 | (1) |
|
|
9 | (1) |
|
Part II --- Pre-15 Improvements |
|
|
10 | (1) |
|
Multiple tempdb Databases |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
Sample Certification Exam |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
System Maintenance Improvements |
|
|
13 | (40) |
|
Recent Pre-ASE 15 Improvements |
|
|
13 | (6) |
|
|
14 | (1) |
|
Native Data Encryption/Security Enhancements |
|
|
14 | (1) |
|
Automatic Database Expansion |
|
|
15 | (1) |
|
|
16 | (2) |
|
|
18 | (1) |
|
|
18 | (1) |
|
Installation of Job Scheduler |
|
|
18 | (1) |
|
|
19 | (25) |
|
Row Locked System Catalogs |
|
|
19 | (1) |
|
|
20 | (1) |
|
Updates to Partition Statistics |
|
|
20 | (2) |
|
Automatic Update Statistics |
|
|
22 | (1) |
|
|
22 | (5) |
|
|
27 | (1) |
|
Datachange, Semantic Partitions, and Maintenance Schedules |
|
|
28 | (3) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
Partition-level Utilities |
|
|
33 | (1) |
|
Partition Configuration Parameters |
|
|
34 | (1) |
|
Utility Benefits from Semantic Partitions |
|
|
35 | (1) |
|
Partition-specific Database Consistency Checks (dbccs) |
|
|
35 | (3) |
|
|
38 | (1) |
|
Changes to the bcp Utility |
|
|
39 | (4) |
|
|
43 | (1) |
|
Very Large Storage System |
|
|
44 | (3) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
47 | (1) |
|
|
48 | (2) |
|
|
50 | (1) |
|
New Configuration Parameters |
|
|
51 | (1) |
|
Eliminated Configuration Parameters |
|
|
52 | (1) |
|
|
52 | (1) |
|
|
52 | (1) |
|
Semantic Partitions and Very Large Database (VLDB) Support |
|
|
53 | (92) |
|
|
53 | (8) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (4) |
|
|
61 | (22) |
|
Configuring ASE for Semantic Partitioning |
|
|
62 | (1) |
|
Partition Support in ASE 15 |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
65 | (5) |
|
|
70 | (5) |
|
|
75 | (3) |
|
|
78 | (5) |
|
|
83 | (1) |
|
Inserting, Updating, and Deleting Data in Partitions |
|
|
84 | (3) |
|
Inserting Data into Semantic Partitions |
|
|
84 | (1) |
|
Inserting Data into Range Partitions |
|
|
84 | (2) |
|
Inserting Data into Hash Partitions |
|
|
86 | (1) |
|
Inserting Data into List Partitions |
|
|
86 | (1) |
|
Deleting Data from All Semantic Partitions |
|
|
86 | (1) |
|
Updating Data in All Semantic Partitions |
|
|
86 | (1) |
|
|
87 | (2) |
|
Data Partition Implementation and Upgrade Strategies |
|
|
89 | (4) |
|
|
93 | (29) |
|
|
94 | (1) |
|
Clustered Prefixed Index on Range Partitioned Table |
|
|
95 | (2) |
|
Clustered Non-Prefixed Index on Range Partitioned Table |
|
|
97 | (2) |
|
Clustered Prefixed Index on List Partitioned Table |
|
|
99 | (2) |
|
Clustered Non-Prefixed Index on List Partitioned Table |
|
|
101 | (3) |
|
Clustered Prefixed Index on Round-robin Partitioned Table |
|
|
104 | (2) |
|
Clustered Non-Prefixed Index on Round-robin Partitioned Table |
|
|
106 | (2) |
|
Clustered Non-Prefixed Index on Hash Partitioned Table |
|
|
108 | (2) |
|
Clustered Prefixed Index on Hash Partitioned Table |
|
|
110 | (3) |
|
|
113 | (1) |
|
Global Nonclustered Prefixed Index on Range Partitioned Table |
|
|
114 | (2) |
|
Global Nonclustered Prefixed Index on List Partitioned Table |
|
|
116 | (2) |
|
Global Nonclustered Prefixed Index on Round-robin Partitioned Table |
|
|
118 | (2) |
|
Global Nonclustered Prefixed Index on Hash Partitioned Table |
|
|
120 | (2) |
|
Query Processor and Partition Support |
|
|
122 | (2) |
|
|
124 | (1) |
|
|
124 | (10) |
|
|
124 | (1) |
|
|
125 | (1) |
|
Change the Number of Partitions |
|
|
126 | (1) |
|
Add a Partition to a Table |
|
|
126 | (4) |
|
|
130 | (1) |
|
Modifications to the Partition Key |
|
|
131 | (3) |
|
|
134 | (9) |
|
Influence of Partitioning on DBA Activities |
|
|
143 | (1) |
|
Influence of Partitioning on Long-time Archival |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
145 | (22) |
|
|
145 | (1) |
|
Scrollable Cursor Background |
|
|
146 | (1) |
|
|
146 | (2) |
|
Cursor-related Global Variables |
|
|
148 | (2) |
|
Changes to the sp_cursorinfo System Procedure |
|
|
150 | (1) |
|
Be Aware of Scrollable Cursor Rules! |
|
|
151 | (1) |
|
|
152 | (12) |
|
Demonstration 1: Update to a Row Already Fetched |
|
|
154 | (2) |
|
Demonstration 2: Update to a Row Not Yet Fetched |
|
|
156 | (1) |
|
Cursor Sensitivity --- An Exception |
|
|
157 | (1) |
|
Locking Considerations with Cursors |
|
|
158 | (1) |
|
|
159 | (1) |
|
Worktable Materialization with Scrollable Sensitive Cursors |
|
|
160 | (3) |
|
Conclusion of Sensitive vs. Insensitive Cursors |
|
|
163 | (1) |
|
Sybase Engineer's Insight |
|
|
164 | (1) |
|
|
164 | (151) |
|
|
165 | (2) |
|
Overview of Changes to the Query Processing Engine |
|
|
167 | (20) |
|
|
167 | (1) |
|
|
168 | (2) |
|
|
168 | (1) |
|
|
169 | (1) |
|
|
169 | (1) |
|
Determining the Current Optimization Goal |
|
|
170 | (1) |
|
|
170 | (2) |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
171 | (1) |
|
opportunistic_distinct_view |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
Optimization Timeout Limit |
|
|
172 | (2) |
|
Query Processor Improvements |
|
|
174 | (11) |
|
|
175 | (2) |
|
Partition Elimination and Directed Joins |
|
|
177 | (2) |
|
Tables with Highly Skewed Histogram Values |
|
|
179 | (2) |
|
|
181 | (1) |
|
|
182 | (1) |
|
|
182 | (3) |
|
|
185 | (2) |
|
Detection and Resolution of Query Performance Issues |
|
|
187 | (38) |
|
|
187 | (1) |
|
An Approach to Poor Query Performance Diagnosis |
|
|
188 | (2) |
|
Common Query Performance Factors |
|
|
190 | (5) |
|
Eliminating Causes for Sub-Optimal Plan Selection |
|
|
191 | (1) |
|
Find Missing or Invalid Statistics |
|
|
191 | (1) |
|
Consider Range Cell Density on Non-Unique Indexes |
|
|
191 | (1) |
|
|
192 | (1) |
|
Identify Poor Index Strategy |
|
|
192 | (1) |
|
|
192 | (1) |
|
Resolve Partition Imbalance |
|
|
193 | (1) |
|
Reset Server-or Session-level Options |
|
|
193 | (1) |
|
|
194 | (1) |
|
Invalid Use of Index Force |
|
|
194 | (1) |
|
Inefficient Query Plan Forced by Abstract Plan |
|
|
195 | (1) |
|
Query Processor ``set options'' --- The Basics |
|
|
195 | (5) |
|
Query Optimizer Cost Algorithm |
|
|
198 | (1) |
|
ASE 15 vs. 12.5.x Cost Algorithm |
|
|
199 | (1) |
|
Query Processor ``set options'' --- Explored |
|
|
200 | (8) |
|
|
200 | (3) |
|
|
203 | (1) |
|
|
204 | (3) |
|
Why Use Abstract Plans for ASE 15? |
|
|
207 | (1) |
|
Application of Optimization Tools |
|
|
208 | (9) |
|
Optimization Goal Performance Analysis |
|
|
208 | (2) |
|
Optimization Criteria Performance Analysis |
|
|
210 | (2) |
|
Optimization Timeout Analysis |
|
|
212 | (4) |
|
Suggested Approach to Fix Optimization Timeout Problems |
|
|
216 | (1) |
|
Detection, Resolution, and Prevention of Partition-related Performance Issues |
|
|
217 | (6) |
|
Data Skew Due to Incorrect Partition Type or Poor Partition Key Selection |
|
|
218 | (2) |
|
Effect of Invalid Statistics on Table Semantically Partitioned |
|
|
220 | (3) |
|
|
223 | (2) |
|
|
225 | (16) |
|
|
225 | (1) |
|
|
226 | (5) |
|
|
226 | (2) |
|
|
228 | (1) |
|
Relationship between Deterministic Property and Materialization |
|
|
229 | (1) |
|
Deterministic and Materialized Computed Columns |
|
|
229 | (1) |
|
Deterministic and Nonmaterialized Computed Columns |
|
|
229 | (1) |
|
Nondeterministic and Materialized Computed Columns |
|
|
230 | (1) |
|
Nondeterministic and Nonmaterialized Computed Columns |
|
|
230 | (1) |
|
Benefits of Using Computed Columns |
|
|
231 | (2) |
|
Provide Shorthand and Indexing for an Expression |
|
|
231 | (1) |
|
Composing and Decomposing Datatypes |
|
|
231 | (1) |
|
|
232 | (1) |
|
Rules and Properties of Computed Columns |
|
|
233 | (2) |
|
Sybase Enhancements to Support Computed Columns |
|
|
235 | (4) |
|
Create Table Syntax Change |
|
|
235 | (1) |
|
Alter Table Syntax Change |
|
|
235 | (1) |
|
|
236 | (1) |
|
|
237 | (2) |
|
|
239 | (2) |
|
|
241 | (20) |
|
|
242 | (9) |
|
|
242 | (4) |
|
Rules and Properties of a Computed Column Index |
|
|
246 | (1) |
|
|
246 | (2) |
|
|
248 | (1) |
|
|
248 | (1) |
|
Impact to Existing Application Code |
|
|
249 | (1) |
|
Determining When to Use a Computed Column Index |
|
|
250 | (1) |
|
|
251 | (1) |
|
|
251 | (7) |
|
|
251 | (1) |
|
Rules and Properties of a Function-based Index |
|
|
252 | (1) |
|
|
253 | (3) |
|
|
256 | (1) |
|
|
256 | (1) |
|
Impact to Existing Application Code |
|
|
257 | (1) |
|
Determining the Use of a Function-based Index |
|
|
257 | (1) |
|
|
258 | (1) |
|
|
258 | (1) |
|
Getting Index Information |
|
|
258 | (1) |
|
|
259 | (2) |
|
Capturing Query Processing Metrics |
|
|
261 | (26) |
|
Alternatives to Query Processing Metrics |
|
|
261 | (1) |
|
Introduction to Query Processing Metrics |
|
|
262 | (1) |
|
Contents of sysquerymetrics |
|
|
263 | (2) |
|
Contents of the sysquerymetrics View |
|
|
264 | (1) |
|
How to Enable QP Metrics Capture |
|
|
265 | (1) |
|
Captured Information Explored |
|
|
266 | (5) |
|
|
266 | (4) |
|
|
270 | (1) |
|
|
270 | (1) |
|
|
271 | (2) |
|
How Is the QP Metrics Information Useful? |
|
|
273 | (3) |
|
Identification of Performance Regression |
|
|
276 | (1) |
|
Comparing Metrics for a Specific Query between Running Groups |
|
|
277 | (2) |
|
Comparing Metrics for All Queries between Running Groups |
|
|
279 | (2) |
|
Why Separate the QP Metrics Data by gid? |
|
|
280 | (1) |
|
Syntax Style Matters; Spacing Does Not |
|
|
281 | (2) |
|
Clearing and Saving the Metrics |
|
|
283 | (1) |
|
Relationship between Stats I/O and QP Metrics I/O Counts |
|
|
284 | (1) |
|
Information for Resource Governor |
|
|
285 | (1) |
|
Space Utilization Considerations |
|
|
285 | (1) |
|
|
286 | (1) |
|
|
286 | (1) |
|
|
287 | (10) |
|
Graphical Plan Viewer from Interactive SQL |
|
|
287 | (7) |
|
Graphical Query Tree Using Set Options |
|
|
294 | (2) |
|
|
296 | (1) |
|
Sybase Software Asset Management (SySAM) 2.0 |
|
|
297 | (26) |
|
|
297 | (1) |
|
|
298 | (1) |
|
|
299 | (1) |
|
Components of Asset Management |
|
|
299 | (7) |
|
|
299 | (1) |
|
SySAM Utility Program --- Imutil |
|
|
300 | (1) |
|
|
300 | (1) |
|
System Environment Variables |
|
|
301 | (1) |
|
|
302 | (1) |
|
|
303 | (1) |
|
|
303 | (1) |
|
|
304 | (1) |
|
Standalone License Server |
|
|
304 | (1) |
|
|
305 | (1) |
|
|
305 | (1) |
|
Acquiring Product Licenses |
|
|
306 | (3) |
|
|
309 | (1) |
|
|
309 | (1) |
|
|
309 | (1) |
|
|
310 | (2) |
|
|
310 | (2) |
|
ASE 15 SySAM Upgrade Process |
|
|
312 | (1) |
|
|
313 | (8) |
|
|
313 | (6) |
|
|
319 | (1) |
|
|
320 | (1) |
|
|
321 | (2) |
|
Installation of ASE Servers |
|
|
323 | (36) |
|
Prior to Installation for All Methods |
|
|
324 | (1) |
|
Installation with Resource Files |
|
|
325 | (7) |
|
Notes for Resource File Installation of ASE |
|
|
325 | (5) |
|
Installation of ASE Components with a Resource File |
|
|
330 | (2) |
|
GUI Installation Method with srvbuild Executable |
|
|
332 | (20) |
|
Installation with the Dataserver Executable |
|
|
352 | (4) |
|
|
356 | (3) |
|
Part II: Pre-15 Improvements |
|
|
|
Multiple Temporary Databases |
|
|
359 | (14) |
|
|
359 | (1) |
|
Purposes for Multiple Temporary Databases |
|
|
360 | (5) |
|
|
360 | (1) |
|
|
361 | (1) |
|
|
361 | (1) |
|
|
361 | (2) |
|
|
363 | (1) |
|
Insensitive Scrollable Cursors |
|
|
364 | (1) |
|
Semi-sensitive Scrollable Cursors |
|
|
364 | (1) |
|
Sensitive Scrollable Cursors |
|
|
364 | (1) |
|
How to Decide When to Add a Temporary Database |
|
|
365 | (2) |
|
|
365 | (1) |
|
|
366 | (1) |
|
|
367 | (1) |
|
Determining Available Temporary Databases |
|
|
368 | (1) |
|
Sample Setup for Temporary Database for ``sa'' Use Only |
|
|
369 | (2) |
|
|
371 | (1) |
|
Dropping Temporary Databases |
|
|
371 | (1) |
|
Altering a Temporary Database |
|
|
372 | (1) |
|
|
372 | (1) |
|
|
372 | (1) |
|
|
373 | (22) |
|
|
373 | (1) |
|
|
374 | (2) |
|
|
376 | (1) |
|
MDA Table Server Configuration Options |
|
|
377 | (3) |
|
|
379 | (1) |
|
|
380 | (2) |
|
|
382 | (1) |
|
What Is Meant by ``stateful'' Tables? |
|
|
383 | (2) |
|
Stateful MDA Table Data Management |
|
|
385 | (6) |
|
|
391 | (1) |
|
|
391 | (2) |
|
|
393 | (1) |
|
|
393 | (2) |
|
Java, XML, and Web Services in ASE |
|
|
395 | (22) |
|
|
396 | (1) |
|
|
396 | (6) |
|
|
397 | (1) |
|
Creating Java Classes and JARs |
|
|
397 | (1) |
|
Using the installjava Utility |
|
|
398 | (1) |
|
Configuring Memory for Java in the Database |
|
|
398 | (1) |
|
Java Classes as Datatypes |
|
|
399 | (1) |
|
An Example of Table Definition Using a Java Class |
|
|
400 | (1) |
|
Performance Considerations |
|
|
400 | (1) |
|
An Example of Using a Java Class within a Select |
|
|
400 | (1) |
|
|
400 | (1) |
|
|
401 | (1) |
|
Recommendations and Considerations |
|
|
401 | (1) |
|
|
402 | (9) |
|
XML Stored in the Database |
|
|
402 | (1) |
|
Option 1: Store the XML Document into a Text Datatype |
|
|
403 | (1) |
|
Option 2: Store the XML Document into an Image Datatype Using xmlparse |
|
|
404 | (1) |
|
Option 3: Store the XML Document into an Image Datatype Using Compression |
|
|
404 | (1) |
|
Option 4: Store the XML Document Outside the Database |
|
|
405 | (1) |
|
HTML Stored in the Database |
|
|
406 | (1) |
|
Recommendations and Considerations |
|
|
406 | (1) |
|
|
407 | (3) |
|
SQL Result Sets Converted to Return an XML Document |
|
|
410 | (1) |
|
|
411 | (6) |
|
|
411 | (2) |
|
|
413 | (2) |
|
Recommendations and Considerations |
|
|
415 | (2) |
Appendix A Sybase ASE 15 Certification Sample Questions and Answers |
|
417 | (30) |
Appendix B Use Cases |
|
447 | (20) |
Index |
|
467 | |