How to Optimize Statistics Collected in SAP


BRCONNECT's statistic collection follows a set of rules. These rules may sometimes give you poor performance. You can override the behaviour by maintaining explicit rules in DBSTATC table using DB21.

Before you want to change the behaviour of statistic collection on a particular table, go to DB21 transaction and check if there is any entry already added for that table. You need to edit that entry instead of adding a new one.

It would also help to export stats that are currently in place if you ever need them back.

To add a new entry to DBSTATC, click on "New Entries" button and populate the fields as follows:
1. Database object with table name
2 Object type with 01 (indicates table)
3. Object owner with SAPR3 or SAP<SID> etc
4. Database with Oracle
5. Usage type with O
6. Active with A, U, N, R or I
   A Statistics created if the table entries change by more than 50% (default)
   U Unconditional creation of statistics.
   N Don't create statistics
   R Temporary statistics or fixing statistics (Note 1374807)
   I Table is igonred. No change to statistics
7. Analysis method with C, CH, E or EH
   C  COMPUTE
   CH COMPUTE + histograms
   E  ESTIMATE
   EH ESTIMATE + histograms
8. Sample size (for E, EH analysis) with P<percent> or R<rows> P20 implies 20% and R7 implies 7000 rows.
9. Customer flag with X (Indicates that customer has added the entry)
10. UDM cluster with THLD=<value_in_%> to indicate STATS_CHANGE_THRESHOLD.

Select update check box to activate indicate that the new entry is active for next statistics update.

Comments

Popular posts from this blog

OS/DB Migration - CMD. STR, TOC, EXT, R3load, DDLDBS.TPL and more

Fixing Inconsistent Table - Table activation fails due to inconsistency between DD and DB

301 Redirect Using SAP Web Dispatcher