Unload Optimizer Statistics to a Text File
You can unload optimizer statistics to a text file. The generated file is in an appropriate format so that it can be used as input to the optimization process. This allows:
• Statistics to be easily moved from one database to another
• A default text file to be created if you are generating your own statistics
Use the statdump -o flag. This command dumps all statistics from database mydb into the file stats.out:
statdump -o stats.out mydb
You can also use Director or VDBA.
Unload Statistics for Selected Tables or Columns
To unload statistics for selected tables or columns, use the statdump -r and -a flags.
This command unloads statistics for only the arel table and col1 of the brel table:
statdump -o stats.out mydb -rarel -rbrel -acol1
In VDBA, use the Read Statistics from Server File option with the Specify Tables and Specify Columns check boxes in the Display Statistics dialog. For example, if you want the stats.out file to contain statistics for the entire arel table and the col1 column in the brel table, enable the Specify Tables check box, and choose only the arel and brel tables from the Specify Tables dialog. Enable the Specify Columns check box and choose only the col1 column for brel from the Specify Columns dialog.