Entering content frameBackground documentation Internal Rules for Update Statistics Locate the document in its SAP Library structure

This algorithm is used by BRCONNECT to update statistics. For more information, see Update Statistics with BRCONNECT.

  1. BRCONNECT determines the working set of tables and indexes to be checked and updated. To do this, it uses:
  1. If the working set contains pool, cluster or other tables that have the ACTIVE flag in the DBSTATC table set to N or R, BRCONNECT immediately deletes the statistics for these tables, because they negatively affect database performance.
  2. BRCONNECT checks statistics for the remaining tables in the working set, including tables that have the ACTIVE flag in the DBSTATC table set to A or P, as follows:

Note

BRCONNECT uses the following standard method to check and update a table's statistics:

The following table describes the default method:

Number of rows in table

Analysis method

Sample size

 

Rows

< 10,000

C

 

10,000 <=

Rows

< 100,000

E

P30

100,000 <=

Rows

< 1,000,000

E

P10

1,000,000 <=

Rows

< 10,000,000

E

P3

10,000,000 <=

Rows

 

E

P1

Analysis method C means compute the statistics exactly. Analysis method E means estimate the statistics using the sample size specified.

For example, "E P10" means that BRCONNECT takes an estimated sample using 10% of rows.

For the CH, CX, EH, and EX methods, histograms are created.

For the CI, CX, EI and EX methods, the structure of indexes is validated in addition to collecting statistics.

  1. BRCONNECT uses the number of new rows for each table in the working set, as derived in the previous step, to see if either of the following is true:

The standard threshold is 50, but the value defined in -f stats -change or the stats_change_threshold parameter is used if specified.

  1. BRCONNECT immediately updates statistics after checking for the following tables:
  1. BRCONNECT writes the results of update statistics to the DBSTATTORA table and also, for tables with the DBSTATC history flag or usage type A, to the DBSTATHORA table.
  2. For tables with update statistics using methods EI, EX, CI, or CX, BRCONNECT validates the structure of all associated indexes and writes the results to the DBSTATIORA table and also, for tables with the DBSTATC history flag or usage type A, to the DBSTAIHORA table.
  3. BRCONNECT immediately deletes the statistics that it created in this procedure for tables with the ACTIVE flag set to N or R in the DBSTATC table.

 

 

Leaving content frame