presentation title here - dugi

46
Db2 12 A new s pin on a successful database Phil Grainger Principal Enablement Manager BMC Software

Upload: others

Post on 21-May-2022

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Presentation Title Here - DUGI

Db2 12A new spin on a successful database

Phil GraingerPrincipal Enablement ManagerBMC Software

Page 2: Presentation Title Here - DUGI

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

Page 3: Presentation Title Here - DUGI

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

Page 4: Presentation Title Here - DUGI

Performance

Page 5: Presentation Title Here - DUGI

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

Page 6: Presentation Title Here - DUGI

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”

Page 7: Presentation Title Here - DUGI

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

Page 8: Presentation Title Here - DUGI

Performance Management Changes

Page 9: Presentation Title Here - DUGI

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

Page 10: Presentation Title Here - DUGI

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

Page 11: Presentation Title Here - DUGI

RUNSTATS ImprovementsMainly around Profiles

• Inline stats now support RUNSTATS profiles

• Optimizer can automatically update profiles

• Statement cache invalidations

• CLUSTERRATIO calculation “improvements”

Page 12: Presentation Title Here - DUGI

Changes for Applications

Page 13: Presentation Title Here - DUGI

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

Page 14: Presentation Title Here - DUGI

SQL Changes – Piecewise Delete

DELETE FROM

(SELECT * FROM mytab

WHERE ……..

FETCH FIRST 5000 ROWS

ONLY)

Allows interspersed COMMITs in large URs

Page 15: Presentation Title Here - DUGI

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

Page 16: Presentation Title Here - DUGI

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)

Page 17: Presentation Title Here - DUGI

Scalability

Page 18: Presentation Title Here - DUGI

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

Page 19: Presentation Title Here - DUGI

• 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

Page 20: Presentation Title Here - DUGI

PBR RPN

20

DDLPAGENUM absolute|relative

DSSIZEIncrease is immediate

DSSIZEDecrease is a pending alter

Zparmfor system default

Page 21: Presentation Title Here - DUGI

Availability

Page 22: Presentation Title Here - DUGI

Insert Partition Index Compression

Online Schema EnhancementsPending Alters

from Immediate

More “DROP Avoidance”

Page 23: Presentation Title Here - DUGI

Security

Page 24: Presentation Title Here - DUGI

Security Changes

• Transfer of ownership

• Installation/Migration without SYSDADM

• Unload privilege

• Long and CaMeL based DBRM names

Page 25: Presentation Title Here - DUGI

Utilities

Page 26: Presentation Title Here - DUGI

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

Page 27: Presentation Title Here - DUGI

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

Page 28: Presentation Title Here - DUGI

How do we get to Db2 12?

Migration from Db2 11 ONLY

Page 29: Presentation Title Here - DUGI

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

Page 30: Presentation Title Here - DUGI

Continuous Delivery

Page 31: Presentation Title Here - DUGI

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

Page 32: Presentation Title Here - DUGI

Continuous DeliveryFunction Levels

Db2 11

Db2 12

Page 33: Presentation Title Here - DUGI

New Function Levels

Page 34: Presentation Title Here - DUGI

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

Page 35: Presentation Title Here - DUGI

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

Page 36: Presentation Title Here - DUGI

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

Page 37: Presentation Title Here - DUGI

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

Page 38: Presentation Title Here - DUGI

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

Page 39: Presentation Title Here - DUGI

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

Page 40: Presentation Title Here - DUGI

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

Page 41: Presentation Title Here - DUGI

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

Page 42: Presentation Title Here - DUGI

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

Page 43: Presentation Title Here - DUGI

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

Page 44: Presentation Title Here - DUGI

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

Page 45: Presentation Title Here - DUGI

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”

Page 46: Presentation Title Here - DUGI

Questions ?