Translate

Note 129252 - Oracle DB Statistics for BW Tables

Summary
Symptom
You want to create DB statistics on a BW-system or an APO or SEM system with an underlying (local) BW. The respective BW runs on an Oracle database platform.
Other terms
OLAP, Business Information Warehouse, InfoCube, Report, Query, Performance, Oracle, Cost-Based Optimizer, Statistics, DB statistics
Reason and Prerequisites
The BW query performance relies on Oracle's cost based optimizer choosing (near-) optimal execution plans. To that end, the cost-based optimizer requires statistical information on content of the tables that are involved in a query. If no such information exists or if it is out-dated then this might cause performance problems. Furthermore Oracle's cost-based optimizer works best for BW if it can rely on statistics with histograms, respectively statistics for columns.
SAPDBA, as a frequently used tool, had problems to create such statistics for various reasons: it lacked the ability to create statistics with histograms and it could not cope with partitioned tables. SAPDBA has been taken out of maintenance.
With SAP base release 6.10, BRCONNECT has taken over SAPDBA's statistics gathering functions. For details see http://service.sap.com/dbaora.
The following section describes the proposed way to gather statistics for the various releases of BW. This refers to the regular process for gathering those statistics. Independently, BW might still analyse tables in appropriate situations such as after data has been loaded, during an aggregates roll-up or a change run. These BW-triggered statistics runs can be switched off. See OSS note 555030 for details.
Solution
  • BW 2.x, BW 3.0A systems
           We recommend to run the report SAP_ANALYZE_ALL_INFOCUBES once per week as a batch job, e.g. at night (see transaction SE38, menu "Program" -> "Execute" -> "Background"). It can run before or after SAPDBA if you use SAPDBA version 4.6D or higher. You should also avoid to run SAP_ANALYZE_ALL_INFOCUBES during data uploads.
           Depending on the sizes of your infocubes the report might run between a few minutes and several hours. Using a 100% sample size, an infocube with a 20-million-rows fact table takes around 2 hours to be analyzed (depending also on your hardware)!
           We suggest that you schedule a weekly job with the report and an initial sample size of 10%. The resulting run time of the job will give you an idea whether you can increase the sample size. This obviously depends also on the time you want to allow the job to run.
           Due to the nature of block-sampling, sample sizes beyond 20% should result in analysis times that are as long as doing a complete analysis (100%). Therefore, we recommend sample sizes of 100% rather than than sizes like 25%, 30%, 40%, ...
           Unfortunately, there is no general (or easy) rule to predict the run time of the report. Therefore we recommend that you experiment in the way described above. In any case, running the report cannot damage anything but increases the BW query performance.
  • BW 3.0B and higher
           We recommend to use BRCONNECT (release 6. 20 or higher) for gathering all DB statistics for BW tables. The proposed way to call BRCONNECT is
                    brconnect -u / -c -f stats -t all
           If your BW system had been upgraded from a BW 2.x or BW 3. 0A system then you have to run the report SAP_DBSTATC_CLEANUP once. This report will clean up the table DBSTATC which was used in the earlier releases to separate the tables that had to be analysed by SAPDBA from those that had to be analysed by the report SAP_ANALYZE_ALL_INFOCUBES. Alternatively, you can initialize the table DBSTATC as described in OSS note 403704. If DBSTATC is not cleaned up then BRCONNECT might not gather all necessary statistics!
  • Remark
           Previously, many customers used the following two calls of BRCONNECT to gather statistics in any of the above BW releases:
                    brconnect -u / -c -f stats -t all -e all_part,info_cubes
                    brconnect-u / -c -f stats -t all_part,info_cubes -f allsel
The first call deals with non-infocube related tables, the second one with infocube related tables, thereby discarding DBSTATC entries. Because this is not the officially supported strategy we recommend to use the aproach described above.
Header Data
Release Status:Released for Customer
Released on:06.08.2003  15:39:45
Master Language:English
Priority:Recommendations/additional info
Category:Performance
Primary Component:BW-SYS-DB-ORA BW ORACLE
Secondary Components:SCM-APO-FCS Demand Planning
BW-SYS-DB BW Database Platforms
Affected Releases
Software
Component
Release
From
Release
To
Release
And
subsequent
SAP_BW
12
12B
12B
X
SAP_BW
20
20A
20B
X
SAP_BW
21
21C
21C
X
SAP_BW
30
30A
30B
X
SAP_BW
310
310
310
X
SAP_BW
40
400
400
X
Correction delivered in Support Package
Support
Packages
Release
Package
Name
SAP_BW
12B
SAP_BW
20A
SAP_BW
20B
SAP_BW
30B
Related Notes

 
1681396 - Query Performance
 
1013912 - FAQ: Oracle BW performance
 
797629 - FAQ: Oracle histograms
 
588668 - FAQ: Database statistics
 
555030 - Deactivating BW-initiated DB statistics
 
524341 - Updating the statistics for individual partitions
 
428212 - Using BRCONNECT to update InfoCube statistics
 
421795 - Report SAP_ANALYZE_ALL_INFOCUBES
 
403704 - BRCONNECT - Enhanced function for Oracle DBA
 
393655 - DP 3.0: Administer performance
 
370601 - Composite SAP note: APO 3.0 and 3.1 performance
 
364305 - ORA-1405:fetched column value is null
 
363092 - Demand Planning: Performance Mass Processing
 
351163 - Creating ORACLE DB statistics using DBMS_STATS
 
323090 - Performance problems due to degenerated indexes
 
314719 - BW2.0 ORACLE FEATURES
 
184905 - Collective note Performance BW 2.0
 
156319 - Collective note performance BW 1.2B
 
16083 - Standard jobs, reorganization jobs

1 comment:

Unknown said...

The post is really informative, you have discussed the primary things that one should kept in mind There are numerous ways you have stuffed here and share your awesome information. SAP APO Online Training

Labels

sap hana hana database aws s4 hana hana db s4hana conversion steps sap hana azure bw4hana hana migration s4hana migration sap cloud migration steps sap hana migration steps sap hana migration to azure s4hana sap fiori fiori performance fiori erp s4 hana fiori sap fiori app sap fiori client sap fiori launchpad sap s4 hana fiori cisco ecc AI SAP AI abap dumps hana sap S/4HANA S/4HANA Conversion best sap ui5 & fiori training configuration database fiori tutorial on webide free sap ui5 & fiori training s/4 hana sap dumps sap fiori tutorial sap ui5 sap ui5 & fiori sap ui5 & fiori tutorial sara ui5cn 2367245 - Troubleshooting performance issues with SAP BPA Amazon free tier for SAP AWS setup Experience CALL_FUNCTION_NOT_FOUND CCMS Configuration and Use Create New Data Class in SAP (Oracle) Critical top SAP Abap dumps DHCP Clients Not Receiving IP Addresses Download Stack.xml HAN-DB HAN-DB-ENG High CPU Usage Due to Excessive Process Switching How To How to Start and Stop SAP Hana Tenant Database How to change SAP Hana Sql Output results are limited to 5000 Records How to perform SAP Dual Stack Split - Netweaver Inactive Objects in SAP Intercompany transactions in SAP AP / AR : Cross Company Code Transaction Interface Flapping Due to Duplex Mismatch KBA LOAD_PROGRAM_LOST MSSQL shrinking transaction log file Migrating to SAP hana database NAT Overload Causing Internet Access Failure Note 500235 - Network Diagnosis with NIPING OSPF Adjacency Not Forming PRINCE2 Foundation Sample Questions Preparing for S/4HANA Conversion and the MUST know items Push to Download Basket S/4HANA Migration Cockpit S/4JANA SAP BI Support Data Load Errors and Solutions SAP BI/BW Landscape SAP BPA SAP Basis SAP Basis Automation SAP Business Objects SAP CPS SAP Certification SAP FI Certification SAP FI Certification Sample Questions SAP HANA Admin - Cockpit SAP HANA DB Engines SAP HANA Database SAP HANA terminate session connection disconnect cancel kill hang stuck SAP Hana DB restore SAP Hana Numeric Error Codes SAP Landscape SAP Language installation SAP MM and Purchase Order Tables SAP Maintenance Planner SAP Note 500235 SAP R/3 Glossary SAP Readiness Check SAP S/4HANA 1709 Installation Files SAP S/4HANA 2023 SAP S/4HANA 2023 Installation SAP S/4HANA 2023 running SAP S/4HANA Installation SAP Scheduling SAP Solman 7.2 CHARM: SAP Support Package Stack Strategy SAP Support package SAP Upgrade SAP support stack upgrade SP stacks STORAGE_PARAMETERS_WRONG_SET SUSE/SLES/Kernel versions Setup of S/4hana 2023 TSV_TNEW_PAGE_ALLOC_FAILED TSV_TNEW_PAGE_ALLOC_FAILED error Transaction ID Unable to download an SAP Note Unix/Linux Command That Are Helpful For SAP Basis Upgrading SAP Kernel Without Downtime Upgrading windows server 2008 to windows server 2019 What is OSS Notes? SAP SNOTE Tutorial accounting agile ale idoc ale/edi archive FI documents audit auditing auditor aws aws cloud basic type bluefield approach ccms ccmsidb charm copilot datavard dbacockpit download sap note download snote edi idoc electronic data interchange enable sap archiving objects erpprep ffid firefighter fraud functional hana admin how to apply sap security note https://www.erpprep.com/ idoc install install sap fiori installation interfaces intermediate document internal control license key linux version materials management messsage niping test order type port prince2 agile prince2 agile practitioner purchasing quick info s4 hana sap abap dumps sap abbreviations sap activate certification sap activate project manager sap authorization sap aws sap brownfield sap ccms sap ccms configuration sap erp sap error sap grc sap greenfield sap internet demo system sap license sap maintenance certificate sap material management sap meaning sap mm sap mm consultant sap monthly security note sap netweaver sap network diagnostic sap niping sap note sap oss sap patch day sap performance sap performance issue sap purchase order sap s/4hana sap sales and distribution sap sap otc sap sd sap sd certification training sap sd course sap sd jobs sap sd module sap sd online training sap sd training sap sd tutorial sap sd tutorial for beginners sap security sap security note sap snote sap snote tutorial sap solution manager sap sql segregation of duties separation of duties sles slicense smc snote snote in sap system sod conflict solution manager solution maneger stop start hana database suse linux techie trex two step upgrade required waterfall