Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
—
Db2 12A new spin on a successful database
Phil GraingerPrincipal Enablement ManagerBMC Software
SoWhat's new with
Db2 12?✓ Performance
Management
✓ Performance
✓ Changes for Applications
Perf
orm
ance
Man
agem
ent ✓ Security
✓ Utilities
Ad
min
istr
atio
n
✓ Availability
✓ Scalability
How do we get there?
✓ Continuous Delivery
Db2 12 - by the Numbers
7 new and 2 changed built in functions
2 new and 1 changed stored procedure
12 new and 44 changed catalog tables
Performance
Better Use of Storage
✓ Contiguous bufferpools✓ Improvement on
PGSTEAL NONE✓ Automatic overflow area✓ Save up to 8% CPU
In-Memory Indexes
✓ Index “Fast Traverse Block”✓ Faster traversal of index
pages✓ Storage area separate from
bufferpools✓Usage managed by Db2
Performance
✓ -DISPLAY STATS✓ IFCIDs 389 and 477✓ Exclude indexes if needed
✓ SYSINDEXCONTROL catalog table
✓ “Up to 23% CPU reduction” for index lookup✓ From IBM material
In-Memory Indexes
Performance
✓ Insert Algorithm 2✓Up to 20% CPU reduction✓Over 1 million inserts per
second
New Insert Algorithm
As always, “the new Db2 performs better than the old one”
Performance Overview – OLTP & Query *
OLTP✓ 2%-3% CPU reduction✓ 5%-10% increase with
Index FTB✓ Contiguous bufferpools
can improve this further
Query✓ 0-20% CPU reduction with
older access paths✓ 10%-40% reduction with new
access paths✓ 90% CPU reduction is possible
* Data from IBM Material
Performance Management Changes
Dynamic SQL StabilityAdvanced Plan Management & Predictable Performance
• Bring advantages of Static SQL bind to dynamic SQL
• Allows dynamic SQL access paths to be retained in the catalog
• Can explain and free stabilized plans
• New SQL matched against stabilized plans before prepare/execute
• Access path can be read into cache from catalog
Static SQL StabilityContinued improvements
• Bind Replace of same version does not change Last Used
• Free original or previous
• Optional “free if invalid”
• Rebind Switch to original
• Avoid accidental switch to invalid copy
RUNSTATS ImprovementsMainly around Profiles
• Inline stats now support RUNSTATS profiles
• Optimizer can automatically update profiles
• Statement cache invalidations
• CLUSTERRATIO calculation “improvements”
Changes for Applications
Unicode columns in EBCDIC tables
Piecewise delete
Inclusive-Inclusive for business and bi-temporal
Global variable extensions
Procedural SQL enhancements
SQL ChangesOverview of selected SQL changes
SQL Changes – Piecewise Delete
DELETE FROM
(SELECT * FROM mytab
WHERE ……..
FETCH FIRST 5000 ROWS
ONLY)
Allows interspersed COMMITs in large URs
Merge Support & SQL PaginationChanges
Merge Support
• Multiple matched clauses
• Additional predicate support
• Delete support
• Signal and ignore allowed
Simpler SQL Pagination
• Data Dependent
• Or Numeric based
SELECT * FROM emp_tab
WHERE (LASTNAME, FIRSTNAME) >
(“GRAINGER”,”PHILIP”)
-or-
SELECT * FROM emp_tab
OFFSET 23 ROWS
FETCH FIRST 23 ROWS ONLY
More SQL Changes
➢ JDBC/ODBC Type 2 performance improvements
➢ ODBC driver support for TIMESTAMP with TIMEZONE
➢ Preserve cached SQL after ROLLBACK➢ Increased maximum tables in View, UDF➢ New built-in functions
▪ HEX2BIN, MEDIAN, HASH, GENERATE_UNIQUE (with length parm)
Scalability
System Scaling Changes
✓ Enhanced efficiency with high numbers of CPs✓ 41% cpu and contention reduction on log latch✓ EDMPOOL skeleton and DBD scalability
improvements✓ Total bufferpool limit is now 16TB✓ Up to 1TB partition size
✓ Up to 4PB table size (and not finished yet)✓ 256(ish) TRILLION rows per table space
✓ Active log datasets 4GB increased to 768GB✓ Exploitation of z13 decompression enhancements
➢ Including LOB compression
• NEW! UTS PBR RPN– Relative Page Number
• Pages are numbered per partition
• Eliminates inverse relationship between number of partitions and individual partition size
• 7 byte RID (2 for partition, 5 for page number)
• Start of partition level attributes
Partition LimitsRoom for further growth
PBR RPN
20
DDLPAGENUM absolute|relative
DSSIZEIncrease is immediate
DSSIZEDecrease is a pending alter
Zparmfor system default
Availability
Insert Partition Index Compression
Online Schema EnhancementsPending Alters
from Immediate
More “DROP Avoidance”
Security
Security Changes
• Transfer of ownership
• Installation/Migration without SYSDADM
• Unload privilege
• Long and CaMeL based DBRM names
Utilities
Utilities
Reorg
✓ Reorg fails if FLASH fails
✓ PGB overflow & partition pruning
✓ Support for COMPRESSRATIO
✓ 17% more zIIPoffload
✓ Mapping Table changes
✓ RO Objects Reorg
Load
✓ Better Load Replace partition with DUMMY
✓ Parallel load for SHRLEVEL CHANGE
✓ 90% additional zIIPoffload
✓ Preformatting for AUX tablespaces
Load
✓Maintain MAXASSIGNEDVAL for identity columns
✓ LOAD RESUME SHRLEVEL NONE BACKOUT YES avoids RECP on failure
Utilities
Recovery
✓ PIT recovery support for some PBG alters
✓ Skip PIT recovery for unchanged objects
Runstats✓ Load/Reorg inline
stats✓ Invalidatecache✓ Colgroup
performance improvements
✓ Improved Load/Reorg concurrency
✓ DSNACCOX✓ DSNUTILV with
CLOBs
How do we get to Db2 12?
Migration from Db2 11 ONLY
Migration Requirements• Continuous Delivery Changes Single Phase Migration
Requirements✓ DFSMS v2.1✓ z/OS v2.1+✓ RACF v2.1✓ Db2 11 NFM✓ z196 machine or higher
Pre-Requisites✓ Db2 11 with fallback SPEs✓ BSDS supporting 10-byte RBAs✓ No pre Db2 10 bound packages✓ Basic row format is deprecated
Continuous Delivery
Continuous DeliveryFunction Levels
• “BNFA” (“CM” ) is now “function level 100” (FL100 or M100)
• Activate function level 500 (V12R1M500) to get new Db2 12 function
– Was “ANFA” aka “NFM”
• Activate function level (V12R1Mnnn) to get newer functions as appropriate
• Display group will tell us where we are and where we have been.
• Test option for activate
• Can (un)activate backwards
Continuous DeliveryFunction Levels
Db2 11
Db2 12
New Function Levels
FL501 - LISTAGG
• Produces a list of all values in a group
• Optional separator argument can be provided
• Ordering can also be specified for the items within the group
34
FL502 – Encryption Key Labels in DDL
• DB2 11 and Db2 12 FL100 both support encrypted datasets• FL502 introduces KEY LABEL syntax to create/alter objects
• Including STOGROUPs
• Use KEY LABEL <label> to indicate encryption is desired• NO KEY LABEL indicates no encryption
• Standard utilities can be used to add/remove encryption• Utility work datasets can also be encrypted via SMS
• Encryption can be specified at PART level for PBR tablespaces• ENCRYPTION_KEYLABEL dsnzparm controls
catalog/directory/archive log encryption
35
FL502 – Explicit Numeric Casting
• Cast an explicit numeric value to a graphic string value
• SMALLINT, INTEGER, BIGINT, DECIMAL, REAL, DOUBLE, FLOAT, and DECFLOAT are all supported
• Optional decimal separator character can be specified
• This support is similar to the existing support for numeric input to the CHAR and VARCHAR built-in functions
• The result is Unicode (UTF-16), and the context must support Unicode data
36
FL503 – Support for Db2 AI
“IBM Db2 AI for z/OS leverages machine learning technology to empower the Db2 for z/OS optimizer to determine the best-performing query access paths, based on your workload”
37
FL503 – Temporal Auditing
• System Temporal historical queries COULD return incomplete data
• Due to NULL values in the audit DATA CHANGE OPERATION column
• Queries about the past would exclude these nulls
• FL503 fixes this anomaly
38
FL503 – Temporal Replication
• A new built-in global variable, SYSIBMADM.REPLICATION_OVERRIDE
• Default is “N”• Applications not allowed to specify values for row-begin, row-end, transaction-start-ID,
and generated expression
• Temporal history for system temporal data is enabled
• Alternate “Y”• Applications are allowed to specify values for row-begin, row-end, transaction-start-ID,
and generated expression
• Temporal history for a system temporal data is disabled
• “Y” allows replication of temporal data, as if it were regular Db2 data
• Intended for use by replication tools• “… not intended for general use”
39
FL503 – CL/FL Messaging
• New console message DSNG014I
• Issued whenever the function level or catalog level changes
• DSNG014I member-name
DB2 NEW CATALOG|FUNCTION LEVEL (new-level)
DB2 CATALOG LEVEL (catalog-level)
CURRENT FUNCTION LEVEL (activated-level)
• Remember the SYSIBM.SYSLEVELUPDATES catalog table has the full story
40
FL504 – Huffman Compression
• Compression of Db2 data with hardware-based encoding (Huffman)With the IBM z14™ Compression Coprocessor (CMPSC).
• Huffman compression is only available for data in universal table spaces
41
FL504 – Prevent creation of deprecated objects
• Prevent creation of certain deprecated objects
• SQL statement in packages that are bound with APPLCOMPAT(V12R1M504) or higher, or with comparable SQL options in effect, are prevented from creating deprecated objects:
• Synonyms
• Segmented or Classic Partitioned tablespaces
• Hash tables
42
FL504 – Many New Built-In Functions
• Support for the passthrough-only built-in functions
• These are passed to the IBM Db2 Analytics Accelerator
43
• CUME_DIST
• CUME_DIST (aggregate)
• FIRST_VALUE
• LAG
• LAST_VALUE
• LEAD
• NTH_VALUE
• NTILE
• PERCENT_RANK
• PERCENT_RANK (aggregate)
• RATIO_TO_REPORT
• REGEXP_COUNT
• REGEXP_INSTR
• REGEXP_LIKE
• REGEXP_REPLACE
• REGEXP_SUBSTR
FL504 – New SQL alternatives for special registers and NULL predicates
• New syntax alternatives to simplify porting of applications from other platforms
• For example, support is introduced in Db2 for z/OS for the following alternative syntax for referencing existing special registers
44
The Future
• Performance and Administration of “worlds best server”
• Some preparation for future changes
• Continued relaxation of limits
• Even more growth?
• Continuous Delivery ….
• Allied items, like “IDAA on z”
Questions ?