presentation title here - nedb2ug 12 an...–unload as well •changes to dsnaccox to avoid more...

Post on 10-Mar-2021

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Db2 12

How do I keep up with this stuff ??Or…….Add your tag line here

Michael CotignolaDb2 Software ConsultantBMC Software

So, what’s new with Db2 12

We’ll take a quick look at the usual suspects:

Reliability, Availability, Scalability, Security

2

But….we can’t forget about:

Analytics, Autonomics, Cloud, Mobile

So, what’s new with Db2 12

• Performance

• Performance Management

• Changes for Applications

• Scalability

• Availability

• Security

• Utilities

• Migration

• And….. Continuous Delivery

3

Performance

Better use of storage

• CONTIGUOUS bufferpools for in memory tables

• Improvement for PGSTEAL(NONE)

– Direct access to row in memory

– Avoid LRU and hash chain management

– Reduces GETPAGE overhead

• Automatic overflow area if objects are too large

– Managed by Db2

• Could “save up to 8% cpu for OLTP”

– From IBM material 5

In-memory indexes

• Index “Fast Traverse Block”…or FTB

• Memory Optimized Structure– New zPARM (index_memory_control)

• Storage area separate from bufferpools– Default is 10MB or 20% of allocated bufferpools

• Usage managed by Db2– DB2 determines which indexes will benefit

– Unique Indexes, <64 Bytes

6

In-memory indexes

• -DISPLAY STATS cmd to show usage– IFCIDs 389 and 477 for more details

– DSNI070I

• Indexes can be excluded if needed– SYSIBM.SYSINDEXCONTROL catalog table

• “Up to 23% CPU reduction” for index lookup

– From IBM material

7

8

9

New insert algorithm

• Advanced new Insert Algorithm– New zparm

– CREATE or ALTER TS DDL

• Up to 20% cpu REDUCTION– From IBM material

• With increased throughput– Insert Algorithm 2 IFCID changes

– DSNI055I

• Over 11 MILLION inserts per SECOND– Your mileage will vary…..

10

Generalized Performance Expectations - OLTP

• Numbers from IBM material

– 2%-3% cpu reduction

– Increases to 5%-10% with Index FTB

– Contiguous bufferpools can improve this even further

11

Generalized Performance Expectations - Query

• Numbers from IBM material

– 0%-20% cpu reduction with older access paths

– 10%-40% with new access paths

– Some may even see up to 90% cpu reduction

12

Performance Management Changes

Dynamic SQL stability

• Bring advantages of static SQL bind to dynamic SQL

– Advanced plan management

– Predictable performance

– No “accidental” performance regression/degradation

14

Dynamic SQL stability

• Allows dynamic SQL access paths to be retained in the catalog

• New SQL matched against stabilized plans before prepare/execute

• Access path can be read into cache from catalog

• Can EXPLAIN and FREE stabilized plans

15

Dynamic SQL stability – but …

• No REBIND

– No PLANMGMT, SWITCH or APREUSE

• No literal concentration

• No TEMPORAL or Transparent Archive

16

Changes for Applications

(Application Enablement)

Overview of selected changes• Piece-Wise delete

DELETE FROM MY_TABLEWHERE C1 = “CRITERIA”

• Can be coded as

DELETE FROM MY_TABLEWHERE C1 = “CRITERIA”FETCH FIRST 5000 ROWS ONLY;

COMMIT;

– Can intersperse COMMITs in large URs

18

Overview of selected changes

• New Reserved Words

• RLF for Static SQL– RLFENABLE

• Automatic rebinds of Plans/Packages– ABIND Subsystem Parm

• Additional Support for TRIGGERs

– Advanced Triggers (SQL PL)

• Including looping and conditional control19

Overview of selected changes

• New Built-In Functions– Generate_Unique

• Improved MERGE statement– DELETE support

– Additional source value support

– SIGNAL and IGNORE

– Additional predicate support

20

Scalability

Addressing partition limits

• New UTS PBR called UTS PBR Relative Page Number (RPN)

• Eliminates relationship between number of parts and DSSIZE

• Pages are numbered PER PARTITION

• 7 byte RID – Up to 1TB partition size

– Up to 4PB table size (but not finished yet)

– 256 TRILLION rows per table space

– And DSSIZE is now at partition level22

More on PBR RPN

• Zparm for system default

• PAGENUM ABSOLUTE/RELATIVE for DDL

– Can ALTER – this is a pending change

• Increasing DSSIZE is immediate

– No reorg needed

• Decreasing DSSIZE is a pending alter

– Still requires entire tablespace reorg

23

CLOB, BLOB, SLOB, or GLOB?

What Do I Need for LOB Compression?

25

• Db2 12 for z/OS

– This feature is available with M500 (“New Function”)

– Only for LOB’s on UTS bases

• z/EDC (“z Enterprise Data Compression”)

• z/OS 2.1 plus PTF’s (3/31/2014), z/OS 2.2, or z/OS 2.3

– z/EDC enabled in IFAPRDxx PARMLIB member

• Z12 or above, with the licensed hardware feature for compression

• APPLCOMPAT!

Basics of LOB Compression

• z/EDC compression is “dictionaryless”

• Compression technique is optimal for large sequential files

• Zlib API is used – software compression is available

• LOB space can be defined or altered to COMPRESS YES– ALTER to COMPRESS YES is deferred– Materializing REORG must be of LOB space (not AUX YES)

26

Basics of LOB Compression

• DSN1COMP works on LOB spaces

• Zparm COMPRESS_DIRLOB compression of directory LOB’s

– On DBD01 and SPT01

– Default is ‘NO’

• Compression and expansion is done at time of I/O

27

Useful Catalog Columns (1|2)

• COMPRESS in SYSTABLEPART (‘Y’ or ‘N’)

• PAGESAVE in SYSTABLEPART

– Saved by RUNSTATS after LOB table is compressed

• New values in SYSPENDINGDDL rows:

– OB JTYPE = ‘S’

– OPTION_KEYWORD = ‘COMPRESS’

– OPTION_VALUE = ‘YES’ or ‘NO’

28

Useful Catalog Columns (2|2)

• TYPE in SYSTABLESPACE (must be ‘O’, for the LOB)

• NACTIVE in SYSTABLESPACE (must be “big”, for the LOB)

• TYPE in SYSTABLESPACE (must be ‘G’ or ‘R’, for the base)

• COLTYPE in SYSCOLUMNS (recommended it be ‘CLOB’)

29

Catalog Queries ??

30

SYSAUXRELS

PARTITION

SYSTABLESPACE

SYSTABLES NAME (Base)

NAMETYPE = ‘G’ OR TYPE = ‘R’

SYSCOLUMNS

NAMECOLTYPE = ‘CLOB’

NAME (LOB)

SYSTABLESPACE

NAMENACTIVE > n

NAMENACTIVEPGSIZESTATSTIME

SYSTABLES

NAMECOMPRESS <> ‘Y’

SYSTABLEPARTVCATPAGESAVESTATSTIME

SYSLOBSTATSAVGSIZESTATSTIME

NAME

DSN1COMP

//MYJOB JOB (ACCT),‘COMP',NOTIFY=&SYSUID,CLASS=A,

// MSGCLASS=X,MSGLEVEL=(1,1),REGION=0M

//*

//DSN1 EXEC PGM=DSN1COMP,PARM=LOB

//STEPLIB DD DSN=MY.LOAD.LIB,DISP=SHR

//SYSUT1 DD DSN=VCAT.DSNDBC.ID17.LOB1.I0001.A001,

// DISP=SHR

//SYSPRINT DD SYSOUT=*

Summary

• Run catalog queries, starting from SYSAUXRELS– Look for bigger spaces, using NACTIVE in SYSTABLESPACE– Consider focusing on COLTYPE=‘CLOB’ in SYSCOLUMNS– Decide if you want to look only at UTS base tables

• Run DSN1COMP against your candidates– How much disk will you save, now and in the future?

• Look at accounting stats for LOB retrievals– How much will compression cost you in SQL execution?

• You now have a business case for your management

32

Availability

Online Schema enhancements

• Insert partition

– No LOBS

• Index compression

– UTS only…..but….

• Column level alters (existing) can become pending alters

– Zparm (DDL_MATERIALIZATION)

– UTS only

34

Security

Security changes

• Transfer of ownership

• Installation/Migration without SYSDADM

• UNLOAD privilege– IFCID 404

36

Utilities

Reorg

• Reorg with only flashcopy now fails if the flash fails

• UTS PBG Reorg allows row overflow

• New keywords for PBG partition pruning– DROP_PART

• Support for COMPRESSRATIO catalog column– Also in Load and Runstats

• Reorg against RO objects– Needed for schema changes ??

38

Load

• Better LOAD REPLACE of empty PBR parts

• Parallel load support for PBG SHRLEVEL CHANGE

• LOAD RESUME SHRLEVEL NONE BACKOUT YES– Avoids RECP on failure

– COPYPEND if LOG NO

• IGNORE option to ignore records excluded by WHEN clause– not treated as discard

• Up to 90% additional zIIP offload39

Recovery

• PIT recovery support for some alters of PBGs

– Page size, segsize, member cluster and dssize

• Skip Point In Time recovery for unchanged objects– SCOPE(UPDATED) default

– Override with SCOPE(ALL)

– TORBA, TOLOGPOINT

• DELETEDS

• NOCOPYPEND40

Runstats

• INVALIDATECACHE– default NO– Except….

• Colgroup performance improvements– 25% CPU, 15% ET– COUNT integer automatically determined

• REGISTER NO– UNLOAD as well

• Changes to DSNACCOX to avoid more reorgs

41

How do we get to Db2 12?

Migration from Db2 11

Migration requires

• z196 machine, or higher• At least z/OS v2.1• DFSMS V2.1 or later• RACF V2.1 or later• IRLM Version 2 Release 3

• And Db2 11 NFM

43

Db2 pre-requisites

• Db2 11 with fallback SPEs

• BSDS supporting 10-byte RBAs

• No pre Db2 10 bound packages

• Basic Row Format is deprecated

– It still works, but…..

• Db2 12 may need more real storage than Db2 11

44

Single phase migration

• No ENFM phase

• BNFA vs ANFA

• ACTIVATE FUNCTION LEVEL

45

Continuous Delivery

Function levels

• Not enough time for an in-depth discussion…..but…..

• VERY loosely – “CM”

• is now going to be Function Level 100 (M100) or “BNFA”

– ENFM goes away• So we

-ACTIVATE FUNCTION LEVEL (V12R1M500)– To get to new Db2 12 function (ANFA)

47

More on function levels

• To get to even newer functions, we just-ACTIVATE FUNCTION LEVEL (V12R1Mnnn)

• -DISPLAY GROUP will tell us where we are

– and where we’ve been

• There is also a TEST option for ACTIVATE

– To ensure that we CAN activate a new function level

– i.e., all the pieces are in place

• AND yes, we can “activate backwards”48

49

50

Questions ?

Bring IT to Life.™

Thank You

© Copyright 2017 BMC Software, Inc.

BMC, BMC Software, the BMC logo, the BMC Software logo, and other BMC marks are the exclusive properties of BMC Software, Inc., and are registered or may be registered in the U.S. and in other countries. BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered in the U.S. and in other countries. All other trademarks or registered trademarks are the property of their respective owners.

top related