Translate

1020260 - Delivery of Oracle statistics (Oracle 10g, 11g)

Symptom
The performance with Oracle 10g or higher is poor. This is due to unfavorable decisions by the Cost Based Optimizer.

Last change of the SAP Note: NOV/26/2013


Reason and Prerequisites
In certain situations, the Cost Based Optimizer (CBO) may make unfavorable decisions, although there are no CBO errors, for example:
  • Tables with heavily fluctuating volumes of data (Note 756335)
  • Selective conditions on columns that do not have many attributes (Note 176754 (8))
  • Correlated values in different columns
In Oracle 9i or lower, performance problems were solved by activating the Rule Based Optimizer (RBO) by using the RULE hint, or by not creating CBO statistics. However, this is no longer possible since RBO is no longer supported in Release 10g or higher. In addition, with Oracle 9i, there are already situations in which the RBO cannot be used (for example, in the case of FIRST_ROWS hint).

Due to several bugs you cannot use the Bind Value Peeking to optimize such situations either.

Alternatively, implement the script for the automatic postprocessing of critical statistic values using DBMS_STATS functions (Note 724545), which is attached to this note. In addition, it ensures that the changes remain in the system permanently and are not overwritten by BRCONNECT statistical runs.

The script is designed for systems with Oracle 10g or higher, but it can also be used for Oracle 9i or lower. In the case of Oracle 9i, you must ignore the PLS-00302 error issued by the system. Note that the delivered statistics may lead to unfavorable accesses under Oracle 9.2.0.6 or lower (for example, die to the Oracle bug 3566843, see Note 176754). Therefore we recommend that you use Oracle 9.2.0.7 or higher.

Currently, statistics are delivered for the following tables:
/SAPAPO/MATLOC
/SAPAPO/ORDADM_I
AFKO
AFPO
AFVC
ARFCRSTATE
ARFCSDATA
ARFCSSTATE
AUFK
AUSP
BBP_PDHGP
BDCP2
BKPF
CATSDB
DDXTF
DDXTT
DFKKOP
DRAW
EDIDC
EKKN
HRP1001
LTAK
MARA
MLST
MSEG
PAYR
QREFTID
RSBATCHDATA
SMOEJOBID
SMOFCDBHD
SMOFCMPDAT
SMOFCMPHD
SMOFCMPOBJ
SMOHJOBQ
SMOHMSGQ
SMOHMSGQRE
SMOHSITEQ
SMOHSITEQEX
SMOHSITEQRD
SWWWIHEAD
SXMSCLUP
SXMSCLUP2
SXMSCLUR
SXMSCLUR2
SXMSPEMAS
SXMSPEMAS2
SXMSPERROR
SXMSPERRO2
SXMSPHIST
SXMSPHIST2
SXMSPMAST
SXMSPMAST2
SXMSPVERS
SXMSPVERS2
TATAF
TBTCO
TESTDATRNRPART0
TRBAT
TRBAT2
TRFCQDATA
TRFCQIN
TRFCQOUT
TRFCQSTATE
UPSITX
VEPO
XI_AF_SVC_ID_MAP
XI_IDOC_IN_MSG
XI_IDOC_OUT_MSG


Solution
A prerequisite for using the delivered statistics is that you use BRCONNECT 7.10 (25) or higher so freezing individual statistics in accordance with SAP Note 1374807 is successful. If required, first apply a current patch before you implement statistics. If you import statistics.txt (even though you use an older BRCONNECT version), BRCONNECT deletes the table statistics due to the ACTIV=R entries you used, which can lead to critical performance problems.

When importing, note the information in the header of the selected script. Note in particular that, as of December 2009, the script is started using "/ AS SYSDBA" instead of the SAP user and that the name of the SAP user must also be transferred in the command line:
sqlplus /nolog @statistics.txt <sapuser>
To solve individual problems (for example, in the RFC area) you can also execute only those parts of the script that refer to the affected tables.

It is usually sufficient to execute the script once. However, to allow for continuous adjustments to the script, you can import the latest version in regular intervals (for example, once per quarter). It may also be useful to execute the script again after SAP upgrades.

If you experience performance problems due to incorrect CBO decisions after implementing the script, you can proceed as follows:
  • On Oracle 10g, you can use DBMS_STATS.RESTORE_TABLE_STATS to restore the original statistics (see Note 588668).
  • On Oracle 9i, you can use DBMS_STATS.EXPORT_TABLE_STATS to export the statistics in accordance with Note 448380 and reimport them using DBMS_STATS.IMPORT_TABLE_STATS (if problems occur). In addition, you must remove the ACTIV=I settings from DBSTATC again.
Also open a customer message, so that SAP can investigate why the system behavior has deteriorated.

If you want to rebuild participating indices after implementing the script, note the following:
  • Oracle 10g or higher: An index REBUILD has no effect on the locked statistics, so you can perform this task without any problems. Note, however, that the follow-on problems described in Note 1095171 may result from index REBUILDs if you perform other activities such as online reorganization or statistics exports. If in doubt, implement this note again after you have performed a reorganization of the tables involved.
  • Oracle 9i: You should always perform a REBUILD without COMPUTE STATISTICS, because otherwise the delivered statistics are overwritten.
In certain cases, you have to take special care with tables for which a complete statistic record is delivered; that is, tables that are listed in the section "COMPLETE STATISTIC DELIVERY" of the script. If, after executing the script, you add new customer-specific indexes or columns to one of the affected tables, you must ensure that the table contains Cost-Based Optimizer (CBO) statistics. The same applies if such a table is to be partitioned in a customer-specific way.

There is no ideal solution in this case. Basically, the following three alternatives are available:
  • Creating new statistics for the affected table:
    brconnect -u / -c -f stats -t <table> -f collect,allsel,keep,locked
You must use BRCONNECT 7.00 or higher
After this, you must implement the relevant script of this SAP Note again.
  • Not using the delivered CBO statistics and, instead, using the normal statistics - which may be locked
  • Manually setting the missing statistics in a useful way (Note 724545)



Header Data

Released On 26.11.2013 15:42:41
Release Status Released for Customer
Component BC-DB-ORA Oracle
Priority Recommendations / Additional Info
Category Performance

5 comments:

Anonymous said...

Aside from this, you need to determine your budget, since the costs normally depdnds on the size aas well as the location of resources.
Moreover, excess consumption oof allcohol is also not good forr
your healyh whereas these pilkls are very safe and natural.
Mello Man helps you relax with its potent mixture of natural herbaal extracts.


Here is my blog post - Party Pills UK

Anonymous said...

Hi I'm Layne Hi, I'm hoping that we have Michael Elder. The best
feature flow rates, the correct support that's why we're pressing it.
There is sojething that is that the lawn. At a abc commercial gallery occurred
only in 1983. It has been mulling her run for your space into account.
When we get in and the natural symbol of happiness.

Take a look at my weblog: producent mebli

Anonymous said...

I used to be sugggested this website via my cousin. I'm no longer
sure wherher this submit is written through him as no onne else recognize
such targeted approximately my difficulty. Youu aree wonderful!
Thank you!

Feel free tto surf to myy website ... nhk world tv live from japan

Anonymous said...

Gгeetings! Τhiѕ is my first viѕit to your blog!
We are a group of volunteers and starting a new proʝect in a community in the
same niche. Your blog providеd us beneficiаl information to work on.
You haѵe dоne a wonderful job!

Also visit my blog post :: Tablet PC 2LooK Quad Core CPU the best performance 4GB RAM smartphone android mobitel

MOUNIKA said...

Nice post.

Telugu movies download
Indian movies download
movies download
Movies watch online
Online movies watch
Hindi movies download

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