ANALYZE
The ANALYZE option tells UNLOAD PLUS to estimate the number of rows for a specific table or partition.
This option is meaningful only when DIRECT YES is in effect.
UNLOAD PLUS uses the results of the ANALYZE option to calculate the sizes of unload data sets during dynamic allocation.
Considerations
The following considerations apply to the ANALYZE option:
- If you are using DIRECT NO or INFILE processing, UNLOAD PLUS bypasses ANALYZE processing.
- If you are unloading LOB or XML data, UNLOAD PLUS ignores this option for any referenced files that it allocates.
We recommend that you use DB2STATS for the most accurate row estimations.
HURBA calculations are based on the size of the Db2 VSAM file and the average maximum row length of all tables in a table space. In situations where compressed or variable-length fields are used, ANALYZE HURBA might report fewer rows than actual for a table space.
Specifying the default
You can specify the default for the ANALYZE command option in your installation options module by using the ANALYZE installation option. UNLOAD PLUS was shipped with a default value of (DB2STATS,NOLIMIT) for this option. The command option overrides the default that is in the installation options module.
DB2STATS
Specify DB2STATS if you want UNLOAD PLUS to use statistical information from the Db2 catalog to estimate the number of rows for a specific table and partition. When you specify ANALYZE DBSTATS and no statistics are available, UNLOAD PLUS defaults to HURBA.
AGE | You can specify the age of the statistics in the Db2 catalog to use when analyzing and calculating the sizes of unload data sets during dynamic allocation.
|
---|
HURBA
Specify HURBA if you want UNLOAD PLUS to use the high-used RBA (HURBA) from the Db2 table space to estimate the number of rows for a specific table and object. UNLOAD PLUS does not use statistics when you specify this option.
When you specify HURBA to size a table or table space, UNLOAD PLUS uses the following formula to calculate the estimated number of rows.
Formula
estimated rows per object = ((HURBA/PGSZ)-2) * RPP
ANALYZE HURBA formula parameters
Formula parameter | Definition |
---|---|
HURBA | Sum of the VSAM high-used RBAs for the Db2 page set or object |
PGSZ | Page size of the table space in bytes |
RPP | Calculated rows per page
|
AVGROWSZ | Average row length |
MAXROWS | MAXROWS value (default 255) specified on the table space definition |
CMRATIO | Compression ratio |
CMRATIO
For compressed Db2 objects, specify CMRATIO if you want UNLOAD PLUS to use a compression ratio to calculate the estimated number of rows for a table space when any of the following conditions exists:
- When HURBA is specified
- As a default because there are no Db2 statistics
- When the statistics are out of date
The value (1 through 100) that you specify for this option represents the percentage to use. For example, if a page would normally hold 10 rows in an uncompressed state, specifying a compression ratio of 50 indicates that these 10 rows occupy only 50% of the page so that the number of rows that would fit in the page would now be 20.
Specifying the default
You can specify the default for the CMRATIO command option in your installation options module by using the CMRATIO installation option. UNLOAD PLUS was shipped with a default value of 50 for this option. The command option overrides the default that is in the installation options module.
Related topics