16
Best_Practice_Table_Partitioning_V21.doc – 03.11.2008 Best Practice Banking Services – Database Performance – Settings for DB2/OS390 Dietmar-Hopp-Allee 16 D-69190 Walldorf CS STATUS customer published DATE VERSION Nov-03 2008 2.1 SOLUTION MANAGEMENT PHASE SAP SOLUTION Operations & Continuous Improvement SAP Banking, SAP Deposits Management TOPIC AREA SOLUTION MANAGER AREA System Management Configuration Management

Banking services – database performance settings for db2 or os390

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Banking services – database performance settings for db2 or os390

Best_Practice_Table_Partitioning_V21.doc – 03.11.2008

Best Practice

Banking Services – DatabasePerformance – Settings for DB2/OS390

Dietmar-Hopp-Allee 16D-69190 Walldorf

CS STATUScustomer published

DATE VERSION

Nov-03 2008 2.1

SOLUTION MANAGEMENT PHASE SAP SOLUTION

Operations & Continuous Improvement SAP Banking, SAP Deposits Management

TOPIC AREA SOLUTION MANAGER AREA

System Management Configuration Management

Page 2: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 2/16

Table of Contents1 Management Summary 3

1.1 Goal of Using This Service 31.2 Staff and Skills Requirements 31.3 System Requirements 3

2 Best Practice 42.1 Design 42.2 Partitioning of a Table 42.3 Data Partitioned Secondary Indexes 52.4 Clustering Index 5

3 Operations and Optimization 63.1 Execution of Partitioning 63.2 Partitioning Recommendations for a Banking Services Solution 73.3 Other Non-Standard Settings 123.4 Tables to Be Excluded from the Regular Automatic Update of the Optimizer Statistics 143.5 Performance-Related SAP Notes 14

Page 3: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 3/16

1 Management Summary

Banking Services is a mass data solution and a maximum throughput and high performance especially ontechnical level is crucial for a smooth operation of the system.

The following document contains summarized recommendations for technical table settings (partitioning) ondatabase level for DB2/S390 for Banking Services to ensure a sufficient performance and scalable solution.

At the end of the document, several performances-related SAP Notes are mentioned.

1.1 Goal of Using This Service

The goal of the document is to support you in achieving an optimal performance of a Banking Services/TRBKsystem on DB2 z/OS.

1.2 Staff and Skills Requirements

Before implementing the described approach, it is necessary to ensure the following as regards the skill setand tasks of the project required team: To perform the settings, a technical expert with database DB2/S390 background is needed.

1.3 System Requirements

SAP allows partitioning to be used in all releases. Explicit support within the inbuilt database administrativefunctions has been available from SAP Release 4.5.

Page 4: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 4/16

2 Best Practice

2.1 Design

Partitioning can improve the manageability of the data, through more effective reorganization (REORG), datamanagement, and backup/recovery strategies, as well as (potentially) improving performance of programsusing this data. Especially for high volumes of data for particular tables, the use of partitioning functionality isrequired.

Generally, partitioning should be considered as tables start to approach a certain size of 64 GB for the tablespace.

For DB2 there is also a concept of Data Partitioned Secondary Indexes, where secondary indexes on tablescan also be partitioned in separate partitions, in this case corresponding to the set of rows in thecorresponding table space partition.

SAP allows partitioning to be used in all releases. Explicit support within the inbuilt database administrativefunctions has been available from SAP Release 4.5. This support is provided by SAP transaction SE14.

2.2 Partitioning of a Table

With DB2 partitioning, several physical data sets (partitions) are created to store the data of one table. Thedata is distributed to the partitions by specifying key ranges in a partitioning index that can contain multiplecolumns.

The partitioning of a table should be done for the following reasons: Table size exceeds 64 GB Only partitioned tables can have a size greater than 64 GB Table is so large that administrative tasks take a long time DB2 utilities, such as REORG or COPY, can be performed on a single partition Avoidance of contention and improvement of performance In systems with a very high workload, partitioning the tables used for the asynchronous update process by

the name of the application server eliminates contentions and improves performance.

Page 5: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 5/16

Figure 1 Partitioning the table

2.3 Data Partitioned Secondary Indexes

There is the possibility to physically partition secondary indexes. The partitioning scheme is the same as thatof the table space. There are as many index partitions in the secondary index as table space partitions, andthe index keys in partition 'n' of the index reference only the data in partition 'n' of the table space. This indexis called a data partitioned secondary index (DPSI).

2.4 Clustering Index

Bad transaction response times can be caused by excessive I/O for specific statements.

When a row is inserted in a table, DB2 tries to place it near the rows that have a similar key value for theindex known as the clustering index. Placing the rows like this greatly improves subsequent retrievals ofranges of rows that are accessed using the clustering index. The rows can be read with fewer I/O operations:It is likely that the pages read contain more rows that need to be retrieved. In addition to that, DB2 canmaximize effects of its sequential prefetch feature.

Page 6: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 6/16

3 Operations and Optimization

3.1 Execution of Partitioning

Partitioning is fully supported by the ABAP Dictionary utilities (transaction SE14). DB2 V8 table-controlledpartitioning is exploited by SAP.

If a table needs to be partitioned or isolated, use DB2 utilities to move the data in case the table has morethan a million entries or is larger than 100 MB. In such a case, a standard or an incremental conversion wouldtake too much time. Both procedures use SQL SELECT-INSERT to perform the data transfer. Therefore, youwill need to perform the following steps: Determine the number of rows with transaction SE16. Make sure that afterwards no write accesses to the

subsystem are carried out apart from the actions described here. In transaction SE14, choose EditStorage parameters to modify the table's storage parameters. Do not initiate a table conversion. Save thenew storage parameters (choose Attributes Save).

Copy the table contents to a sequential data set using DB2 utilities, for example, DSNTIAUL or REORGwith option UNLOAD EXTERNAL.

Recreate the table: Activate and adjust database with the Delete data option in transaction SE14. TheSAP system uses the saved storage parameters when creating database, table space, table and indexes.

Reload saved table contents into the newly created table (option: LOG NO). As a first backup, carry out a full image copy of the table space. This also cancels the Copy Pending. Execute RUNSTATS on the table and check the number of entries using transaction SE16.

Note: You can also execute table partitioning with the program RBCA_PARTITION_TABLES. Settings forthe partitioning have to be performed in development class BCA_FINSERV_Y. In this case, you have toadjust the following tables: BCA_PART_TAB_DET: Set the number of partitions, member cluster and the compression. BCA_PART_TAB_FLD: Fill this table with the fields, for which the partitioning should be performed. BCA_PART_TAB_IND

Page 7: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 7/16

Figure 2 Execution Steps for Partitioning

3.2 Partitioning Recommendations for a Banking Services Solution

For large installations, SAP recommends that you partition several tables. This document proposes aprocedure that supports a Banking Services system with data sharing for many batch runs. All tables must bepartitioned in such a way that the first field in the index after the client (field CLIENT, MANDT) is used as apartitioning criterion. For most tables, this is the internal contract ID (usually the field CONTRACT_INT). It canbe assumed that the values are distributed randomly across the entire value set available.

With database version 8.1 and higher, all tables are automatically partitioned with table controlled partitioningif you use partitioning. This means that the data can be partitioned independently of the index definition. Youcan then alternatively create indexes as global indexes or partitioned indexes.

Below is a list of indexes that should be partitioned in a different manner.1. The tables should be partitioned according to the first two fields (partitioning index).2. The list also contains other indexes that should be partitioned in this way, but you should define the

partitioning index as a clustered index (Cluster = Yes).

With DB2 V7, partitioning was possible only according to a partitioning index. This means that data and thepartitioning index were partitioned in parallel. All other indexes are global. To define other indexes as'partitioned', you must convert the table in advance according to SAP Note 792649.

Page 8: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 8/16

Partitioning Index (1), partitioned (2)

Table Index (1) Index (2) Purpose

Payment items

BCA_PAYMITEM S02 Payment items

BCA_PAYMITEM S01

BCA_PAYMITEM 0

BCA_PAYMITEM S04

BCA_PAYMITEM_NT 0 Payment items, Payment notes

BCA_GL_PAYMITEM 0 General Ledger: Information about payment items

BCA_GL_PAYMITEM FKY

BCA_SB_2BR 01 Savings book update

BCA_SB_2BR_CHNG 01 Changes to savings book update

Additional Data

BCA_PRENOTE 0 Prenotes

BCA_PRENOTE 001

BCA_NOW_ABS 01 Available balance series of notice on amount

BCA_TRANSFIG2 0 Value date transaction figures

BCA_COUNTER 0 Counters (for example, item counter)

BCA_ACCTBAL 0 Account balance

Payment order

BCA_PO_HD ACC Payment order header

BCA_PO_IT 0

BCA_PO_NT 0

Standing order

BKKSOHD 0 Header information

1 Only when you use the saving function2 Up to and including DM 4.0, this was the table BKK9B

Page 9: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 9/16

Table Index (1) Index (2) Purpose

BKKSOIT 0 Recipient item of a standing order

BKKSOIT_VAR_AMNT 0 Standing order: Variable amounts

BKKSOITNT 0 Payment notes of recipient items

BKKSO_PAORN 0 Payment orders of a standing order

General ledger (only if you use this function)

BCA_GL_BSPR_PROT 0 Log table balance sheet preparation

BCA_GL_BPITEM 0 Transfer postings balance sheet preparationheader

BCA_SNITEM 0 Non-balance-changing transactions basic data

BCA_GL_SNITEM 0 Non-balance-changing transactions

BCA_GL_BALCN 0 Balances in FI per account

BCA_GL_TRNTP 0 Account balances per G/L transaction

Contract master data

BCA_CONTRACT 0 Contract

BCA_CN_LINK S01 Contract elements of the contract

BCA_CN_EVENT 001 Contract: Events

BCA_CNSP_ACCT 0 Contract: Account specialization

BCA_BCT_CN_OBJV 0 BW extraction: contract data

Specialization cards (only if you use the card function)

BCA_CARD_HEADER 0 Card specialization

BCA_CARD_ADMIN 001 Administrative data for cards

BCA_CARD_EQUIP 001 Attributes for features of a card

BCA_CARD_TRANS 211 Transaction data for a card

BCA_CARD_LOCK 001 Lock data of a card

BCA_CARD_PRC_CHG 001 Log change of a card

BCA_CARD_CAPTURE 001 Return data

BCA_CARD_CHG 001 Master data changes

Page 10: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 10/16

Table Index (1) Index (2) Purpose

BCA_CARD_CHG_HIS 001 Master data changes for history3

BCA_CARD_INFO 001 Information fields

BCA_CARD_SHIPM 001 Dispatch data

Account settlement data

BCA923 0 Settlement data

BKK92_SIM 0 Settlement data - alternative settlements

BKK92_SUMS 0 Settlement data totals

BKK92_SUMS_SIM 0 Settlement data totals - alternative settlements

BKK92_POSTINGS 0 Account settlement data settlement postings

BCA964 0 Settlement detail data

BKK96_SIM 0 Settlement detail data - alternative settlements

BCA92_RESTART5 0 Settlement restart information

BCA_CN_PER_ACBAL 0 Settlement due dates

BCA_CN_EV_ACBAL 1 Settlement dates

Bank statement

BCA_BCAS_DUE 0 Bank statement due dates

BCA_BCAS_EVBST 001 Event-controlled bank statement

Balance confirmation (only if you use this function)

BCA_BANO_DUE 0 Balance confirmation due dates

BCA_BANO_EVT 001 Balance confirmation events

Financial conditions

FICOT_CONDI I016 Individual conditions

3 Up to and including DM 4.0, this was the table BKK924 Up to and including DM 4.0, this was the table BKK965 As of FSBP 1.0 only6 If you do not use the individual conditions often, you can define the I01 index as a clustering index instead of the partitioning the entiretable.

Page 11: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 11/16

Due to the enhancements in DB2 V8.1, you can also partition tables without a partitioning index. Thefollowing list contains the fields for partitioning and any partitioned indexes. For successful partitioningaccording to the fields ADDKEY/FIKEYC, you must activate the totals record optimization (SAP Note494171). As the SELECTS for the tables listed here are not usually included with the partitioning criterion, asmall number of partitions should be selected. As an indication, we recommend four times the number ofmembers.

Partitioning Partitioned

Table Field Index

BCA_INV_DETAILS (CLIENT,CONTRACT_INT) 100

BKKC01B (MANDT,FIKEYC)

BCA_RCN_SUMS_IN (MANDT,ADDKEY) A01

BCA_RCN_SUMS_OUT (MANDT,ADDKEY) A01

BCA_INV_TOTALS (CLIENT, ADDKEY)

BANK_MR_LINE_COUNT (CLIENT, ADDKEY)

Archive information structures

The archive information structures are stored in generated tables, which are all called ZARIXIS*. You can findthe repository of all archive information structures in transaction SARI Customizing. To find theassignments of the generated tables to the archive information structures, display an individual informationstructure in the technical data. If you use the F4 input help in transaction SE11 for a ZARIXIS* table, thesystem displays a list containing the information structure tables, and the appropriate archiving object isdisplayed in the short text. The ZARIX tables should be partitioned for the following information structures:

Info structure/Field catalog Archiving Object

BCA_COUNTER COUNTER

BCA_DISPORDER DISPORDER

BCA_FIGURES FIGURES

BCA_PAYMITEM PAYMITEM

BCA_PAYMORDER PAYMORDER

BCA_PRENOTE PRENOTE

BCA_SETTLEMENT SETTLEMENT

BCA_STANDORDER STANDORDER

Page 12: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 12/16

SAP_AM_CARD01 AM_CARD

BCA_INDCOND INDCOND7

The tables for all information structures (except for BCA_PAYMITEM) must be partitioned according to theprimary index. Create an additional index (001) with fields MANDT/CONTRACT_INT/DATE_POST forBCA_PAYMITEM according to which this table must be partitioned.

Shadow tables for archive information structures

In release 3.0, there are tables to improve the check whether data has been archived, in addition to thearchive information structures. For these tables, only one entry or few entries per account are expected.

SAP recommends partitioning according to the following procedure.

Index

BCA_AR_COUNT_CP 0 Max. posting period for arch. counter

BCA_AR_FIGRS_CP 0 Max. posting period for arch. transaction figures

BCA_AR_PAYM_MD 0 Max. posting date for arch. payment items

BCA_AR_SETTL_MTS 0 Max. end-time stamp for arch. settlements

3.3 Other Non-Standard Settings

Descending Indices (only required for indexes that were generated under DB2 V7):

Table Index

BCA92 0

BKK92_SIM 0

BCA_GL_BALCN 0

BCA_PAYMITEM S01, S02

For the following ZARIXIS tables (archive information structures)

Archive info structure Index of relevant ZARIXIS table

BCA_COUNTER 0

BCA_FIGURES 0

7 Only if individual conditions are used to a large extent (many entries in FICOT_CONDI)

Page 13: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 13/16

Archive info structure Index of relevant ZARIXIS table

BCA_SETTLEMENT 0

BCA_PAYMITEM 001

Make sure that the partitions are also defined in descending order of the contract_int intervals.

Tables with "Member Cluster":

Payment items- BCA_PAYMITEM- BCA_PAYMITEM_ENQ- BCA_PAYMITEM_NT- BCA_SB_2BR- BCA_SB_2BR_CHNG

Additional data- BCA_NOW_ABS- BCA_PRENOTE

General ledger- BCA_GL_PAYMITEM- BCA_GL_BSPR_PROT- BCA_GL_BPITEM- BCA_SNITEM- BCA_GL_SNITEM- BCA_GL_BALCN

Payment order- BCA_PO_HD- BCA_PO_IT- BCA_PO_NT

Standing order- BCASO_PAORN8

General ledger transfer- BCA_GL_BSPR_PROT

Account settlement data- BKK92_SUMS- BKK92_SUMS_SIM- BKK92_POSTINGS- BKK96- BKK96_SIM

Spool- TST03

Correspondence tool- DFKKCODCLUST- DFKKCOH- DFKKCOHI

8 Up to and including DM 4.0, this was the table BKKSO_PAORN

Page 14: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 14/16

- DFKKCOHARC Change documents

- CDHDR- CDCLS (must be carried out as specified in SAP Note 96515)

Application log- BALDAT

For the following tables, the clustering index should be defined in a different way to the primary index. Followthe instructions in SAP Note 438727.

Table Recommended clustering index

BCA_PAYREF S02 Payment details BCA_DEH_DOC_HEAD

ACC PLM document header

3.4 Tables to Be Excluded from the Regular Automatic Update of the OptimizerStatistics

BCA_PAYMITEM_ENQ

This option is recommended for tables that temporarily become very large during live operation and whosecontents become very small again afterwards. For a table of this type, the statistics should be generated at atime when the table contains many entries and then never changed again. SAP Note 507824 contains notesabout how to implement this option in DB2.

3.5 Performance-Related SAP Notes

766012 DB2/390 V7: Real Time Statistics und DSNACCOR

765983 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765897 DB2/390 V7: Real Time Statistics and DSNACCOR

765790 DB2/390 V7: Real Time Statistics and DSNACCOR

765781 DB2/390 V7: Real Time Statistics and DSNACCOR

765619 DB2/390 V7: Real Time Statistics and DSNACCOR

765617 DB2/390 V7: Real Time Statistics and DSNACCOR

765552 DB2/390 V7: Real Time Statistics and DSNACCOR

765551 DB2/390 V7: Real Time Statistics and DSNACCOR

765509 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765508 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765507 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

Page 15: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 15/16

765506 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765505 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765504 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765503 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765502 DB2/zOS: Reducing number of DSNACCOR REORG recommendations

765500 DB2/390 V7: Real Time Statistics and DSNACCOR

720733 FICO: Performance improvements - index on FICOT_CONDI

507824 DB2/390 V7: Real Time Statistics and DSNACCOR

494171 Performance notes FS-AM

438727 DB2/390: Changing Clustering Index

Page 16: Banking services – database performance settings for db2 or os390

Best PracticeBanking Services – Database Performance – Settings for DB2/OS390

© 2008 SAP AG - Best_Practice_Table_Partitioning_V21.doc page 16/16

© Copyright 2007 SAP AG. All Rights ReservedNo part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.The information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries,zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBMCorporation.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of CitrixSystems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, MassachusettsInstitute of Technology.Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented byNetscape.MaxDB is a trademark of MySQL AB, Sweden.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. Allother product and service names mentioned are the trademarks of their respective companies. Data contained in this document servesinformational purposes only. National product specifications may vary.

The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any formor for any purpose without the express prior written permission of SAP AG.This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This documentcontains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP toany particular course of business, product strategy, and/or development. Please note that this document is subject to change and maybe changed by SAP at any time without notice.SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of theinformation, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind,either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages thatmay result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you mayaccess through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide anywarranty whatsoever relating to third-party Web pages.