-force with Update Statistics

This section gives examples of how you can use the -force options to override the internal rules for update statistics. For more information about the -force options, see -f stats.


Only use these options in exceptional circumstances.

·        Check and update statistics for all tables in tablespace PSAPBTAD

brconnect -u / -c -f stats -t psapbtabd -f allsel

·        Update statistics without check for all tables relevant to the application monitor

brconnect -u / -c -f stats -t dbstatc_mon -f collect

·        Update statistics for a pool table specified in the DBSTATC table, to determine space usage, using method "estimate 10% rows"

brconnect -u / -c -f stats -t atab -m EI -s P10 -f allsel,method,sample,collect,space

BRCONNECT stores the space usage data in tables DBSTATTORA (for tables) and DBSTATIORA (for indexes). Finally, the statistics can be immediately deleted ­– for example, when the ACTIVE flag is set to N in DBSTATC.

If you want to keep the statistics for such tables – for example, for test purposes – you must include the keep option in the command, as follows:

brconnect -u / -c -f stats -t rfblg -m EI -s P10 -f allsel,method,sample,keep

·        Check and update statistics according to the two-phase concept:


                            a.      First phase: Check statistics

brconnect -u / -c -f stats -t all -f nocoll

                            b.      Second phase: Update statistics on tables identified in the first phase

brconnect -u / -c -f stats -t all -f nocheck