+ All Categories
Home > Documents > SAP - Oracle BRSPACE Online Reorganization

SAP - Oracle BRSPACE Online Reorganization

Date post: 27-Oct-2015
Category:
Upload: mohamed-awny
View: 212 times
Download: 6 times
Share this document with a friend
Description:
Oracle BRSPACE Reorganization
32
BRSPACE Online Reorganizations Advanced Reorganizations Martin Frauendorfer, SAP Active Global Support [email protected] April 2009
Transcript

BRSPACE Online ReorganizationsAdvanced Reorganizations

Martin Frauendorfer, SAP Active Global Support

[email protected]

April 2009

© SAP 2009 / Page 2

1. Overview2. Advanced Reorganizations

Agenda

© SAP 2009 / Page 3

Overview (1)

Reorganizations in general

A reorganization in a database context is the recreation orcleanup of one or several segments.Several types of reorganization exist:

Index reorganization (e.g. via REBUILD or COALESCE), mainly used toreduce index fragmentationTable reorganization with tools like:

– BRSPACE (online, offline, export / import)– Oracle tools (DBMS_REDEFINITION, MOVE, EXP / IMP, EXPDP /

IMPDP, …)– SAP functionality (ICNV, SE14, …)

Tablespace reorganization (reorganization of all tables in the tablespaceand recreation of the tablespace)

In this presentation we concentrate on the BRSPACE onlinereorganization of tables (which also includes tablespacereorganizations).

© SAP 2009 / Page 4

Overview (2)

In which situations can a table reorganization be useful?

Reduction of table sizeCleanup of table fragmentationChange of table storage parameters (e.g. INITRANS)Move of table to a different tablespaceReduction of chained and migrated rowsReduction of number of allocated extentsTransition from LONG to LOB columns (Oracle >= 10g)Reduction of hot spots on disk levelActivation of Transparent Data EncryptionChange of table structure

© SAP 2009 / Page 5

Overview (3)

In which situations can a tablespace reorganization be useful?

Activation of LMTSActivation of ASSMCleanup of freespace block corruptionReduction of database sizeReduction of backup sizeReduction of filesystem sizeReduction of fragmentationReduction of number of datafilesIncrease of number of datafilesTransition to new tablespace layoutOther change to tablespace layoutOptimization of filesystem layout

© SAP 2009 / Page 6

Overview (4)

How does a BRSPACE online reorganization work?Determination of CREATE commands for target table and indexes basedon DBMS_METADATA.GET_DDLCreation of target table with naming convention <source_table>#$Export of source table CBO statistics based onDBMS_STATS.EXPORT_TABLE_STATSCopy of source table data to target table based onDBMS_REDEFINITION.START_REDEF_TABLE. This package will implicitlycreate a materialized view log MLOG$_<source_table> to track allchanges that are performed on the source table while the reorganizationis running.Creation of target indexes with naming convention <source_index>#$Import of source table CBO statistics to target table based onDBMS_STATS.IMPORT_TABLE_STATSFinalizing of the online reorganization usingDBMS_REDEFINITION.FINISH_REDEF_TABLE. In this step all changes inthe materialized log are applied to the target table and the names ofsource and target table are exchanged.The source table is dropped.The „#$“ suffix of the target table indexes is removed.

© SAP 2009 / Page 7

Overview (5)

What are the advantages of a BRSPACE Online Reorganization?

It uses the advantages of DBMS_REDEFINITION:The reorganization can be performed in parallel to production operation.This means the table is accessible and records can be inserted / updated /deleted.If anything goes wrong during the reorganization the source table stillexists unchanged and no restore / recovery is necessary.Compared to an offline reorganization via export / import all data has to becopied only once and not twice

It provides possibilities for client and server side parallelism inorder to speed up the reorganization if sufficient systemresources exist and the reorganization should finish within aspecific time window.It has already proven to be a reliable reorganization tool at manycustomers.It performs a lot of useful activities implicitly that would require alot of manual efforts and impose the risk of errors ifDBMS_REDEFINITION is used directly.

© SAP 2009 / Page 8

Overview (6)

What are the restrictions of a BRSPACE Online Reorganization?

It is only available as of Oracle 9i.It cannot handle tables with LONG or LONG RAW columns. As of10g it is possible to convert them during an online reorganizationon the fly to LOB columns (if SAP >= 6.40 is used).Temporarily twice the space is needed because both source andtarget table and indexes exist in parallel.If a table has no primary key constraint (or no unique index withNOT NULL columns) a ROWID based online reorganization isnecessary that requires overhead (ROWID index, ROWID column).The setup of the materialized view is an overhead that cannegatively impact the performance of the reorganization of manyvery small tables.Structure changes on the source table and its indexes must notbe performed during the reorganization (as they would be lost).

© SAP 2009 / Page 9

Overview (7)

How is a normal BRSPACE Online Reorganization started?

Table reorganization:brspace -f tbreorg -t <table_name>

Tablespace reorganization:brspace -f tbreorg -s <source_tsp> -t "*" -n <target_tsp>

Additional useful options exist, e.g.:-p <degree>

BRSPACE parallelism degree-e <degree>

PX parallelism degree-l <category>

Initial extent size category-i <target_ind_tsp>

Definition of target index tablespace (if different from target tabletablespace)

For more detailed information see note 646681 and the BRSPACEonline documentation.

© SAP 2009 / Page 10

Advanced Reorganization Scenarios Overview

Example for advanced reorganization scenarios:

Optimization of data clusteringChanging the sort order of the table recordsTransition to an Index Organized Table (IOT)

PartitioningActivation of partitioning for a formerly unpartitioned tableRepartitioning of an already partitioned table

Table structure changesAdditional columnsModified columns (e.g. datatype and default value change)Removed columns

© SAP 2009 / Page 11

Scenario 1: Optimization of Data Clustering (1)

Motivation

In many cases good table data clustering in central tables is a keyfactor for good performance.This factor is often ignored and instead optimizations are onlyperformed on index, CBO or ABAP side.Typical candidates for a better clustering:

RESB: Sorting by MATNRDFKKOP: Sorting by GPART / VKONT / VTREFVDBEKI / VDBEPI: Sorting by RANL

With BRSPACE the sorting can be done online.

© SAP 2009 / Page 12

Scenario 1: Optimization of Data Clustering (2)

ExampleIf e.g. 100 records for one DFKKOP business partner (GPART)exist and they are scattered across the whole table, in the worstcase 100 table blocks have to be read to retrieve the records.If the table is sorted by GPART and there are e.g. 10 records ineach block, only about 10 blocks need to be read.If the I/O sub system additionally provides read-aheadfunctionality and already caches subsequent blocks during eachI/O read activity, this can also significantly improve theperformance.This can improve the total access performance by factor 10 ormore.In a high-end system with an average of 500 concurrent I/O readrequests during parallelized batch runs sorting DFKKOP reducedit to < 250 concurrent I/O requests and improved the performanceof central DFKKOP accesses by more than factor 20.Real-life tuning results: see page 26 to the end of thispresentation.

© SAP 2009 / Page 13

Scenario 1: Optimization of Data Clustering (3)

Warning

Only do this if you understand clearly how the critical and typicaltable accesses look like!With the wrong data clustering you can cause criticalperformance problems!It is a good idea to monitor the access predicates and the sharedcursor cache data of the different table accesses for a longer timebefore deciding to implement a different data clustering.

© SAP 2009 / Page 14

Scenario 1: Optimization of Data Clustering (4)

Approach 1: Sorting table records by an index

Directly supported by BRSPACE reorganization option "-sortind<index_name>"Advantages:

No table structure changeDisadvantages:

Only a temporary solution because future DML operations can reduce theclustering more and more. So it may be necessary to perform the sortingon a regular basis.

© SAP 2009 / Page 15

Scenario 1: Optimization of Data Clustering (5)

Approach 2: Transition to an Index Organized Table (IOT)

No automatic support by BRSPACE, manual adaptations neededSteps:

Start the BRSPACE online reorganization with the additional option "-dfirst".BRSPACE will stop after it had created the CREATE commands for thetarget table and indexes in$SAPDATA_HOME/sapreorg/<reorg_subdir>/ddl.sqlNow the CREATE TABLE command can be adapted manually:

– Replace ") PCTFREE" with ", CONSTRAINT"<table_name>~<iotindex_suffix>" PRIMARY KEY(<iotindex_columns>)) ORGANIZATION INDEX PCTFREE"

– Remove "PCTUSED <percent>"– Remove CREATE command for secondary index if used as IOT

primary key index.Afterwards the BRSPACE reorganization can be continued with "c"

© SAP 2009 / Page 16

Scenario 1: Optimization of Data Clustering (6)

Approach 2: Transition to an Index Organized Table (IOT)

Advantages:Permanently guaranteed sort orderTable and IOT index combined in one segment

Disadvantages:Errors due to manual adaptations possibleTypical IOT disadvantages:

– Larger secondary indexes– Overhead of secondary index accesses– Additional maintenance tasks like logical ROWID recalculation– Table fragmentation can increase because of its index design– Primary key constraint required– Only supported by ABAP DDIC if IOT is based on SAP primary index

Mainly useful for IOTs on primary index on tables with a smallnumber of secondary indexes

© SAP 2009 / Page 17

Scenario 2: Partitioning (1)

Motivation

Partitioning can be useful for several reasons, e.g.:Optimization of data clustering: Similar like the previous approachesalso partitioning can be used to optimize data clustering

Partitioning based on clustering columnArchiving / deletion support: Partitioning can also be used to make surethat the table can be easily cleaned after archiving or deletion activitiesusing DROP PARTITION or MERGE PARTITION

Partitioning based on archiving criteriaAdministration support: Large segments that are difficult to administer(e.g. consistency check, statistics creation, reorganization) can be split intosmaller partitions that can be administered individually

E.g. hash partitioning based on any column

© SAP 2009 / Page 18

Scenario 2: Partitioning (2)

Procedure

No automatic support by BRSPACE, manual adaptations neededSteps as described for the IOT approachPARTITION clauses have to be added to the CREATE TABLE andCREATE INDEX commands as requiredAdvantages:

Permanently guaranteed clustering and reduced segment sizesDisadvantages:

Errors due to manual adaptations possibleOften continuous partitioning maintenance necessary

© SAP 2009 / Page 19

Scenario 3: Structure Changes (1)

Motivation

Structure changes like added or modified columns often causetrouble on large tables:

Long conversion times because each record has to be modified individuallySometimes even longer conversion times because of ASSM problemsDanger of significant amount of chained and migrated rows if blocks don'tcontain sufficient freespace for additional dataSAP standard tools like SE11 / SE14 / ICNV don't provide a possibility forparallelization

A conversion based on a BRSPACE online reorganizationprovides the following advantages:

Shorter runtime due to parallelism possibleNo danger of chained and migrated rows as target table is created fromscratchConversion can be done fully online

© SAP 2009 / Page 20

Scenario 3: Structure Changes (2)

ProcedureNo automatic support by BRSPACE, manual adaptations neededUtilization of the undocumented BRSPACE column mappingfeatureAttention: Errors in the manual procedure can result in a wrongtable structure and a restore may be required!Functionality available as of BRSPACE 7.00 (40) and 7.10 (20)BRSPACE profile with parameter _reorg_col_map for columnmapping information has to be createdBRSPACE has to be started with this profile ("-p <profile>"), the "-d first" option and the "-UCM" switch in order to activate thecolumn mapping feature.When BRSPACE stops, the CREATE TABLE command has to beadapted as required (additional columns, removed columns,changed columns).Before doing the final switch BRSPACE will stop a second time.This allows you to control the time of the switch (e.g. duringupgrade downtime).

© SAP 2009 / Page 21

Scenario 3: Structure Changes (3)

Case StudyDuring a SAP upgrade the following changes are necessary fortable DBERCHZ4:

Add column GGVERTRAG (VARCHAR2(18), DEFAULT ' ')Add column OLD_BELNR (VARCHAR2(12), DEFAULT ' ')Increase length of column LAUFNR from 2 to 5 characters, fill up with'0' on left side

The incremental conversion (ICNV) of DBERCHZ4 took days andweeks because the table contained 4 billion records.If it is possible to use BRSPACE we could do the conversion alsoonline and we could use advanced possibilities likeparallelization.Therefore it was decided to use BRSPACE for the conversion.

© SAP 2009 / Page 22

Scenario 3: Structure Changes (4)

Case Study (2) - ProcedureImplementation of BRSPACE 7.00 (40)Definition of column mapping parameter in BRSPACE profile:_reorg_col_map = "

MANDT MANDT,

BELNR BELNR,

CONCAT(''000'', LAUFNR) LAUFNR,

"

Start of BRSPACE:brspace -p <profile> -f tbreorg -t DBERCHZ4 -e 12 -d first -n<target_tablespace> -l 2 -UCM

-e 12: Parallel execution with degree 12-d first: Stop after DDL commands are generated-l 2: Define initial extent with 64K-UCM: Use column mapping parameter (_reorg_col_map)

© SAP 2009 / Page 23

Scenario 3: Structure Changes (5)

Case Study (3) - ProcedureWait until BRSPACE stops and modify the generated DDLcommands in ddl.sql:

Add: "GGVERTRAG" VARCHAR2(18) DEFAULT ' ' NOT NULL ENABLE,Add: "OLD_BELNR" VARCHAR2(12) DEFAULT ' ' NOT NULL ENABLE,Change LAUFNR:

– Old: "LAUFNR" VARCHAR2(2) DEFAULT '00' NOT NULL ENABLE,

– New: "LAUFNR" VARCHAR2(5) DEFAULT '00000' NOT NULL ENABLE,

Continue BRSPACE runWith the "-UCM" option BRSPACE stops before the final switchhappensDuring the upgrade downtime BRSPACE was continued and thestructure switch was executed.The total conversion runtime was 11:05 hours.

© SAP 2009 / Page 24

Thank you!

© SAP 2009 / Page 25

Copyright 2008 SAP AGAll rights reserved

No 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 changedwithout prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge 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. All other product and service names mentioned andassociated logos displayed are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

The information in this document is proprietary to SAP. 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 to any particular course of business, product strategy,and/or development. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, orother 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 ofmerchantability, 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 that may result from the use of these materials. This limitationshall 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 may access through the use of hot links contained in thesematerials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages

Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durchSAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Servicessowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Alle anderen in diesem Dokument erwähntenNamen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zuInformationszwecken. Produkte können länderspezifische Unterschiede aufweisen.

Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderenVereinbarung mit SAP. Dieses Dokument enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts und ist für SAP nicht bindend, einen bestimmtenGeschäftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP übernimmt keine Verantwortung für Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht dieRichtigkeit oder Vollständigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewähr, wederausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zwecksowie für die Gewährleistung der Nichtverletzung geltenden Rechts.

SAP übernimmt keine Haftung für Schäden jeglicher Art, einschließlich und ohne Einschränkung für direkte, spezielle, indirekte oder Folgeschäden im Zusammenhang mit der Verwendungdieser Unterlagen. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.Die gesetzliche Haftung bei Personenschäden oder die Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinkszugreifen, unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen überInternetseiten Dritter ab.

Alle Rechte vorbehalten.

0.0.1 SQL Statement Optimizations

SQL_ID 1d95nbgv99t8go Records / execution: 1010 1010o Elapsed time / execution: 9433 ms 385 ms (-95.9 %)o Disk reads / execution: 782 148 (-81.1 %)o Buffer gets / execution: 1036 714 (-31.1 %)

SQL_ID 8quphygrj062fo Records / execution: 1012 1007o Elapsed time / execution: 5095 ms 257 ms (-95.0 %)o Disk reads / execution: 461 90 (-80.5 %)o Buffer gets / execution: 1038 640 (-38.3 %)

SQL_ID g2uv258uqqburo Records / execution: 1029 1021o Elapsed time / execution: 7390 ms 87 ms (-98.8 %)o Disk reads / execution: 751 108 (-85.6 %)o Buffer gets / execution: 984 229 (-76.7 %)

SQL_ID gma9rjdqa6bfuo Records / execution: 20 11o Elapsed time / execution: 118 ms 0.3 ms (-99.7 %)o Disk reads / execution: 13 0 (-99.9 %)o Buffer gets / execution: 22 8 (-63.6 %)

SQL_ID 2nazry3c20zjao Records / execution: 7503 8022o Elapsed time / execution: 34937 ms 1837 ms (-94.7 %)o Disk reads / execution: 4046 767 (-81.0 %)o Buffer gets / execution: 7737 9790 (+26.5 %)

SQL_ID bnqk08xqvf0kf (not batch related)o Records / execution: 30 29o Elapsed time / execution: 54 ms 8 ms (-85.2 %)o Disk reads / execution: 3 3 ( 0.00 %)o Buffer gets / execution: 31 18 (-41.9 %)

SQL_ID c7yujg368xy21o Records / execution: 33 43o Elapsed time / execution: 189 ms 26 ms (-86.2 %)o Disk reads / execution: 18 7 (-61.1 %)o Buffer gets / execution: 46 43 (- 6.5 %)

SQL_ID 98wvdav8ufundo Records / execution: 5 47o Elapsed time / execution: 6764 ms 1475 ms (-78.2 %)o Disk reads / execution: 1253 1259 (+ 0.5 %)o Buffer gets / execution: 2659 1337 (-49.7 %)

SQL_ID df5hba15k20zto Records / execution: 1 0o Elapsed time / execution: 5397 ms 134 ms (-97.5 %)o Disk reads / execution: 1219 0 (-99.9 %)o Buffer gets / execution: 1344 1189 (-11.5 %)

SQL_ID aunzbuhzxt4kdo Records / execution: 13 0o Elapsed time / execution: 93395 ms 1462 ms (-98.4 %)o Disk reads / execution: 13526 249 (-98.2 %)o Buffer gets / execution: 15813 810 (-94.9 %)

SQL_ID dark6z8yk15mdo Records / execution: 0.5 0.5o Elapsed time / execution: 292 ms 6 ms (-97.9 %)o Disk reads / execution: 32 1 (-96.9 %)o Buffer gets / execution: 70 6 (-91.4 %)

SQL_ID 4b8pnankwkqz4o Records / execution: 3 0o Elapsed time / execution: 99999 ms 2073 ms (-97.9 %)

o Disk reads / execution: 15131 402 (-97.3 %)o Buffer gets / execution: 20626 4647 (-77.5 %)

0.0.2 Batch Job OptimizationsLooking at the critical physical DFKKOP accesses during batch runs the following differences can be seen:

Initial situation:

---------------------------------------------------------------------------------------------------------|END_INTERVAL_TIME |TABLE_PATTERN|PHYSICAL_READS_PER_SECOND|PHYSICAL_READS_TABLE|PHYSICAL_READS_INDEXES|---------------------------------------------------------------------------------------------------------|24.02.2009 07:00:39|DFKKOP | 7.09| 0| 12948||24.02.2009 06:00:51|DFKKOP | 6.81| 0| 12197||24.02.2009 05:30:59|DFKKOP | 6.01| 0| 11125||24.02.2009 05:00:08|DFKKOP | 8.35| 0| 14805||24.02.2009 04:30:34|DFKKOP | 4498.00| 8180755| 10094||24.02.2009 04:00:13|DFKKOP | 26357.84| 13603333| 32681041||24.02.2009 03:30:57|DFKKOP | 27407.01| 22997772| 27266678||24.02.2009 03:00:23|DFKKOP | 31898.16| 24248093| 33774668||24.02.2009 02:30:04|DFKKOP | 10718.28| 10363135| 8372421||24.02.2009 02:00:56|DFKKOP | 11301.73| 10178862| 10277266||24.02.2009 01:30:46|DFKKOP | 17325.93| 23116061| 8243874||24.02.2009 01:00:36|DFKKOP | 19038.98| 27357731| 7121857||24.02.2009 00:30:25|DFKKOP | 13988.50| 25263099| 135||24.02.2009 00:00:19|DFKKOP | 8003.16| 12794998| 1306577||23.02.2009 23:30:57|DFKKOP | 1435.89| 1210365| 1407263||23.02.2009 23:00:34|DFKKOP | 1695.55| 2072609| 992951||23.02.2009 22:30:26|DFKKOP | 21242.02| 35732890| 2948836||23.02.2009 22:00:05|DFKKOP | 5981.18| 10734187| 55855|---------------------------------------------------------------------------------------------------------

After optimization:

---------------------------------------------------------------------------------------------------------|END_INTERVAL_TIME |TABLE_PATTERN|PHYSICAL_READS_PER_SECOND|PHYSICAL_READS_TABLE|PHYSICAL_READS_INDEXES|---------------------------------------------------------------------------------------------------------|18.03.2009 07:00:47|DFKKOP | 40.89| 0| 73972||18.03.2009 06:30:38|DFKKOP | 10815.08| 8731365| 10854736||18.03.2009 06:00:27|DFKKOP | 5219.35| 6089084| 3154388||18.03.2009 05:30:56|DFKKOP | 3163.26| 5306304| 533065||18.03.2009 05:00:10|DFKKOP | 1963.62| 3522736| 0||18.03.2009 04:30:10|DFKKOP | 0.00| 0| 0||18.03.2009 04:00:10|DFKKOP | 0.00| 0| 0||18.03.2009 03:30:10|DFKKOP | 0.00| 0| 0||18.03.2009 03:00:22|DFKKOP | 495.21| 876492| 35||18.03.2009 02:30:52|DFKKOP | 813.22| 1475182| 0||18.03.2009 02:00:38|DFKKOP | 777.95| 1406527| 0||18.03.2009 01:30:30|DFKKOP | 666.74| 1204133| 0||18.03.2009 01:00:24|DFKKOP | 445.68| 0| 807119||18.03.2009 00:30:13|DFKKOP | 1139.32| 736933| 1268266||18.03.2009 00:00:53|DFKKOP | 1073.33| 907741| 1031758||17.03.2009 23:30:46|DFKKOP | 521.75| 485926| 463141||17.03.2009 23:00:10|DFKKOP | 0.00| 0| 0||17.03.2009 22:30:50|DFKKOP | 4673.31| 7194075| 1362750||17.03.2009 22:00:19|DFKKOP | 1228.86| 900701| 1311243|---------------------------------------------------------------------------------------------------------

DFKKOP Physical Reads per Second

0

5000

10000

15000

20000

25000

30000

35000

22:00 22:30 23:00 23:30 00:00 00:30 01:00 01:30 02:00 02:30 03:00 03:30 04:00 04:30 05:00 05:30 06:00 06:30 07:00

JP1RS3

DFKKOP Logical Reads per Second

0

10000

20000

30000

40000

50000

60000

70000

80000

90000

22:00 22:30 23:00 23:30 00:00 00:30 01:00 01:30 02:00 02:30 03:00 03:30 04:00 04:30 05:00 05:30 06:00 06:30 07:00

JP1RS3

Total Physical Reads per Second

0

5000

10000

15000

20000

25000

30000

35000

22:00 22:30 23:00 23:30 00:00 00:30 01:00 01:30 02:00 02:30 03:00 03:30 04:00 04:30 05:00 05:30 06:00 06:30 07:00

JP1RS3

Total Logical Reads per Second

0

50000

100000

150000

200000

250000

22:00 22:30 23:00 23:30 00:00 00:30 01:00 01:30 02:00 02:30 03:00 03:30 04:00 04:30 05:00 05:30 06:00 06:30 07:00

JP1RS3

Concurrently active Oracle Sessions

0

100

200

300

400

500

600

700

22:00 22:30 23:00 23:30 00:00 00:30 01:00 01:30 02:00 02:30 03:00 03:30 04:00 04:30 05:00 05:30 06:00 06:30 07:00

JP1RS3

0.0.3 CPU UtilizationThe significant amount of I/O related to DFKKOP resulted in a significant amount of system CPU utilization.In the following we compare if the CPU utilization is positively affected by the DFKKOP optimizations:

--------------------------------------------------------------------------------------------------------------------|TIMEFRAME |ASH_FG |ASH_BG |ASH_TOTAL|SYSSTAT|OS_USER|OS_SYS |OS_IDLE|OS_IO |OS_TOTAL|--------------------------------------------------------------------------------------------------------------------|18.03.2009 06:30:38-18.03.2009 07:00:47| 2.14| 0.13| 2.27| 3.06| 3.46| 1.73| 10.50| 24.36| 40.05 ||18.03.2009 06:00:27-18.03.2009 06:30:38| 9.25| 0.10| 9.36| 11.69| 10.17| 5.15| 4.27| 20.31| 39.90 ||18.03.2009 05:30:56-18.03.2009 06:00:27| 7.35| 0.24| 7.59| 9.64| 8.93| 4.96| 7.73| 18.40| 40.01 ||18.03.2009 05:00:10-18.03.2009 05:30:56| 5.88| 0.15| 6.03| 7.36| 6.81| 4.12| 7.91| 21.19| 40.03 ||18.03.2009 04:30:16-18.03.2009 05:00:10| 3.84| 0.09| 3.92| 5.23| 5.07| 3.14| 17.26| 14.60| 40.07 ||18.03.2009 04:00:09-18.03.2009 04:30:16| 2.74| 0.11| 2.86| 3.49| 5.17| 2.18| 12.72| 19.90| 39.96 ||18.03.2009 03:30:44-18.03.2009 04:00:09| 1.60| 0.13| 1.73| 2.25| 3.01| 1.71| 15.33| 19.94| 39.99 ||18.03.2009 03:00:22-18.03.2009 03:30:44| 2.35| 0.13| 2.48| 3.06| 3.22| 2.74| 12.37| 21.66| 39.98 ||18.03.2009 02:30:52-18.03.2009 03:00:22| 7.99| 0.20| 8.19| 10.22| 9.02| 5.13| 3.58| 22.22| 39.94 ||18.03.2009 02:00:38-18.03.2009 02:30:52| 12.00| 0.25| 12.25| 15.03| 13.40| 6.95| 0.64| 19.00| 39.99 ||18.03.2009 01:30:30-18.03.2009 02:00:38| 12.93| 0.27| 13.20| 16.33| 14.61| 7.94| 0.20| 17.13| 39.88 ||18.03.2009 01:00:24-18.03.2009 01:30:30| 13.02| 0.25| 13.28| 16.13| 14.73| 7.81| 0.35| 17.25| 40.14 ||18.03.2009 00:30:13-18.03.2009 01:00:24| 12.42| 0.43| 12.85| 15.00| 14.06| 8.46| 0.81| 16.63| 39.96 ||18.03.2009 00:00:53-18.03.2009 00:30:13| 10.09| 0.55| 10.64| 11.69| 11.98| 6.65| 3.35| 18.02| 40.01 ||17.03.2009 23:30:46-18.03.2009 00:00:53| 9.53| 0.68| 10.21| 10.91| 11.63| 7.25| 2.06| 19.03| 39.98 ||17.03.2009 23:00:27-17.03.2009 23:30:46| 4.77| 0.36| 5.13| 6.12| 6.42| 4.11| 11.34| 18.22| 40.09 ||17.03.2009 22:30:50-17.03.2009 23:00:27| 3.43| 0.24| 3.67| 4.30| 4.81| 2.94| 10.35| 21.84| 39.94 ||17.03.2009 22:00:19-17.03.2009 22:30:50| 7.06| 0.44| 7.50| 8.57| 9.00| 4.63| 4.98| 21.42| 40.03 ||17.03.2009 21:30:19-17.03.2009 22:00:19| 3.79| 0.29| 4.08| 4.82| 5.43| 3.10| 13.22| 18.27| 40.02 |--------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------|TIMEFRAME |ASH_FG |ASH_BG |ASH_TOTAL|SYSSTAT|OS_USER|OS_SYS |OS_IDLE|OS_IO |OS_TOTAL|--------------------------------------------------------------------------------------------------------------------|24.02.2009 06:30:13-24.02.2009 07:00:39| 4.57| 0.44| 5.01| 5.34| 9.81| 3.49| 7.97| 18.75| 40.01 ||24.02.2009 06:00:51-24.02.2009 06:30:13| 4.97| 0.31| 5.28| 5.12| 10.33| 3.91| 13.22| 12.56| 40.02 ||24.02.2009 05:30:59-24.02.2009 06:00:51| 1.85| 0.15| 2.00| 2.21| 4.51| 1.99| 20.78| 12.60| 39.88 ||24.02.2009 05:00:08-24.02.2009 05:30:59| 2.91| 0.30| 3.21| 3.91| 6.95| 2.60| 13.30| 17.13| 39.98 ||24.02.2009 04:30:34-24.02.2009 05:00:08| 3.70| 0.45| 4.15| 4.34| 8.12| 3.44| 9.33| 19.08| 39.97 ||24.02.2009 04:00:13-24.02.2009 04:30:34| 5.82| 0.34| 6.16| 7.75| 10.91| 4.67| 2.57| 21.79| 39.94 ||24.02.2009 03:30:57-24.02.2009 04:00:13| 5.06| 0.24| 5.30| 8.57| 9.48| 5.13| 0.83| 24.48| 39.93 ||24.02.2009 03:00:23-24.02.2009 03:30:57| 5.69| 0.20| 5.89| 9.94| 9.46| 5.67| 0.43| 24.45| 40.00 ||24.02.2009 02:30:04-24.02.2009 03:00:23| 12.85| 0.30| 13.14| 18.80| 17.37| 8.74| 0.12| 13.70| 39.92 ||24.02.2009 02:00:56-24.02.2009 02:30:04| 11.40| 0.44| 11.84| 15.73| 16.72| 7.87| 0.24| 15.19| 40.02 ||24.02.2009 01:30:46-24.02.2009 02:00:56| 13.78| 0.48| 14.26| 18.22| 19.74| 11.71| 0.09| 8.39| 39.92 ||24.02.2009 01:00:36-24.02.2009 01:30:46| 16.45| 0.43| 16.88| 23.42| 21.58| 13.21| 0.00| 4.73| 39.52 ||24.02.2009 00:30:25-24.02.2009 01:00:36| 16.04| 0.27| 16.31| 24.55| 21.36| 13.57| 0.00| 5.39| 40.33 ||24.02.2009 00:00:19-24.02.2009 00:30:25| 16.35| 0.37| 16.72| 23.47| 22.53| 13.55| 0.00| 3.97| 40.05 ||23.02.2009 23:30:57-24.02.2009 00:00:19| 9.70| 0.34| 10.05| 13.29| 15.21| 9.16| 0.35| 15.38| 40.10 ||23.02.2009 23:00:34-23.02.2009 23:30:57| 11.29| 1.14| 12.44| 11.73| 18.93| 8.42| 1.41| 11.12| 39.87 ||23.02.2009 22:30:26-23.02.2009 23:00:34| 9.31| 0.85| 10.16| 11.08| 16.34| 8.33| 0.93| 14.41| 40.01 ||23.02.2009 22:00:05-23.02.2009 22:30:26| 9.07| 0.88| 9.95| 13.85| 15.66| 8.61| 0.31| 15.42| 40.01 |

|23.02.2009 21:30:01-23.02.2009 22:00:05| 13.74| 0.75| 14.49| 15.07| 20.51| 6.68| 2.44| 10.41| 40.04 |--------------------------------------------------------------------------------------------------------------------

Number of utilized CPUs

0

5

10

15

20

25

30

22:00 22:30 23:00 23:30 00:00 00:30 01:00 01:30 02:00 02:30 03:00 03:30 04:00 04:30 05:00 05:30 06:00 06:30 07:00

JP1RS3

0.0.4 Check for Side EffectsSorting DFKKOP by GPART / VKONT / VTREF negatively impacted the clustering factor of indexDFKKOP~0, so there was the risk that certain OPBEL selections using the primary index become slower.Based on the following SQL statement (SQL_ID 3uhp4jakqrr18) we checked if a negative impact is visible:

SELECT "BETRH" , "BETRW"FROM "DFKKOP"WHERE "MANDT" = :A0 AND "OPBEL" = :A1 AND "OPUPK" = :A2 AND "OPUPW" = :A3

We compared the history data of February with the current data and could verify that the elapsed time perexecution and the elapsed time per record have even slightly improved:

------------------------------------------------------------------------------------------|STAT_NAME |VALUE |VALUE_PER_EXECUTION|VALUE_PER_RECORD |------------------------------------------------------------------------------------------|SQL_ID | 3uhp4jakqrr18 | | || | 3uhp4jakqrr18 | | || | | | || | | | ||Start Time | 17.02.2009 23:00:47 | | || | 14.03.2009 14:25:08 | | || | | | || | | | ||End Time | 25.02.2009 22:01:02 | | || | 20.03.2009 13:30:35 | | || | | | || | | | ||Module |SAPLFKL9 | | |

| |SAPLFKL9 | | || | | | || | | | ||Executions | 23972453 | | || | 7079475 | | || | -70.47 %| | || | | | ||Records | 67199397 | 2.80 | || | 18684369 | 2.64 | || | -72.20 %| -5.85 % | || | | | ||Disk Reads | 17558136 | 0.73 | 0.26 || | 5413144 | 0.76 | 0.29 || | -69.17 %| 4.40 % | 10.88 %|| | | | ||Buffer Gets | 157847636 | 6.58 | 2.35 || | 44077728 | 6.23 | 2.36 || | -72.08 %| -5.44 % | 0.43 %|| | | | ||Elapsed Time (ms) | 201488451 | 8.40 | 3.00 || | 52812137 | 7.46 | 2.83 || | -73.79 %| -11.24 % | -5.73 %|| | | | ||CPU Time (ms) | 65001984 | 2.71 | 0.97 || | 27995158 | 3.95 | 1.50 || | -56.93 %| 45.84 % | 54.90 %|| | | | ||I/O Wait Time (ms) | 197427260 | 8.24 | 2.94 || | 51959900 | 7.34 | 2.78 || | -73.68 %| -10.88 % | -5.34 %|| | | | ||Application Wait Time (ms)| 0 | 0.00 | 0.00 || | 0 | 0.00 | 0.00 || | 0.00 %| 0.00 % | 0.00 %|| | | | ||Concurrency Wait Time (ms)| 15241 | 0.00 | 0.00 || | 1799 | 0.00 | 0.00 || | -88.20 %| -60.03 % | -57.55 %|| | | | ||Cluster Wait Time (ms) | 0 | 0.00 | 0.00 || | 0 | 0.00 | 0.00 || | 0.00 %| 0.00 % | 0.00 %|| | | | ||Direct Writes | 0 | 0.00 | 0.00 || | 0 | 0.00 | 0.00 || | 0.00 %| 0.00 % | 0.00 %|| | | | ||Parse Calls | 106707 | 0.00 | || | 5520 | 0.00 | || | -94.83 %| -82.48 % | || | | | ||Sharable Memory (kb) | 26 | | || | 22 | | || | -15.38 %| | || | | | |------------------------------------------------------------------------------------------


Recommended