52
Db2 12 How do I keep up with this stuff ?? Or……. Add your tag line here Michael Cotignola Db2 Software Consultant BMC Software

Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

  • Upload
    vantu

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Db2 12

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

Michael CotignolaDb2 Software ConsultantBMC Software

Page 2: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 3: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

So, what’s new with Db2 12

• Performance

• Performance Management

• Changes for Applications

• Scalability

• Availability

• Security

• Utilities

• Migration

• And….. Continuous Delivery

3

Page 4: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Performance

Page 5: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 6: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 7: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 8: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

8

Page 9: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

9

Page 10: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 11: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 12: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 13: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Performance Management Changes

Page 14: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Dynamic SQL stability

• Bring advantages of static SQL bind to dynamic SQL

– Advanced plan management

– Predictable performance

– No “accidental” performance regression/degradation

14

Page 15: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 16: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Dynamic SQL stability – but …

• No REBIND

– No PLANMGMT, SWITCH or APREUSE

• No literal concentration

• No TEMPORAL or Transparent Archive

16

Page 17: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Changes for Applications

(Application Enablement)

Page 18: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 19: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 20: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 21: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Scalability

Page 22: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 23: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 24: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

CLOB, BLOB, SLOB, or GLOB?

Page 25: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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!

Page 26: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 27: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 28: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 29: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 30: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 31: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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=*

Page 32: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 33: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Availability

Page 34: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 35: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Security

Page 36: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Security changes

• Transfer of ownership

• Installation/Migration without SYSDADM

• UNLOAD privilege– IFCID 404

36

Page 37: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Utilities

Page 38: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 39: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 40: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 41: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 42: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

How do we get to Db2 12?

Migration from Db2 11

Page 43: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 44: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 45: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Single phase migration

• No ENFM phase

• BNFA vs ANFA

• ACTIVATE FUNCTION LEVEL

45

Page 46: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Continuous Delivery

Page 47: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 48: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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

Page 49: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

49

Page 50: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

50

Page 51: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

Questions ?

Page 52: Presentation Title Here - NEDB2UG 12 An Update.pdf · BladeLogic and other BladeLogic marks are the exclusive properties of BladeLogic, Inc., and are registered or may be registered

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.