The sample size that BRCONNECT uses when updating statistics was 1% or more in the past. Now it is possible to use much smaller sample sizes, which improves the performance of update statistics on large tables. You can now set sample sizes of 0.001% to 100%. This applies to the following ways of setting the sample size:
Parameter stats_sample_size in init<DBSID>.sap
Field OPTIO (sample size) in the DBSTATC field
In all cases, you can set
Example
To set the sample size to 0.05%, enter a value of P.05 in the brconnect —f stats —s command, the stats_sample_size parameter in init<DBSID>.sap, or the OPTIO field of the DBSTATC table.
The BRCONNECT standard formula to determine the sample size is as follows:
Number of Rows |
Sample Size in % |
---|---|
0 - 9,999 |
100 |
10,000 - 99,999 |
30 |
100,000 - 999,999 |
10 |
1,000,000 - 9,999,999 |
3 |
10,000,000 - 99,999,999 |
1 |
100,000,000 - 999,999,999 |
0.3 |
1,000,000,000 - 9,999,999,999 |
0.1 |
10,000,000,000 - 99,999,999,999 |
0.03 |
100,000,000,000 - 999,999,999,999 |
0.01 |
1,000,000,000,000 - 9,999,999,999,999 |
0.003 |
> 9,999,999,999,999 |
0.001 |