statdump(8sql)
Name
statdump − print statistics available through the iistats and iihistograms views of the Standard Catalog Interface.
Syntax
statdump [options] [ULTRIX/SQL options] dbname
[ -rtablename [-acolumnname]... ]...
Description
The statdump utility lets you inspect the iistats and iihistograms views that are part of the Standard Catalog Interface. These views show statistical information about columns. The statistical information is usually generated by execution of the optimizedb command and is used by the ULTRIX/SQL query optimizer to select an efficient data retrieval strategy for execution of SQL statements.
Options
−acolumnname
Produce statistics for the specified column in the table named with the preceding −r option. If you do not name columns on the optimizedb command line, the utility produces statistics for all columns. If statdump cannot find a specified table or column, the utility prints a warning message and continues processing.
−o filename
Direct the output of statdump to the file specified by filename. The resulting file is an ASCII file whose content is identical to the information normally sent to the terminal screen. You can edit this file; however, only certain changes are acceptable if you plan to use the file as input to the optimizedb command. (See the description of the −i option in optimizedb(8sql) for information about using filename with the optimizedb command.)
−rtablename
Produce statistics for tablename. If you do not name tables on the statdump command line, the utility produces statistics for all tables. If statdump cannot find a specified table or column, the utility prints a warning message and continues processing.
−zcDirect the statdump utility to display statistics on the system catalogs as well as on tables containing user data. If you want statistics for selected system catalogs rather than all of them, specify the −zc option and also include −r options to name the catalogs whose statistics you want to see. You must be the database administrator for dbname to use the −zc option.
−zdlDelete, rather than display, statistics from the system catalogs. If you want to delete statistics only for specific tables (for all or only some columns), remember to include −r or −r and −a options, as appropriate, on the command line.
−zf#Direct statdump to output floating-point values in scientific notation (for example, 9.9999+e9) and set the precision to the level specified by #. The total width of the displayed number will be equal to the value of the precision level plus 7.
−zqPrint out only the information contained in the iistats catalog and not the histogram information contained in iihistograms. (Quiet mode.)
[ULTRIX/SQL options]
Direct statdump to pass one or more sql options to ULTRIX/SQL. Refer to sql(1sql) for a description of the options.
Examples
Print statistical information for all columns in the employee table of the empdata database:
statdump empdata -remployee
For all columns in all tables of the empdata database, print out only the information in the iistats system table:
statdump -zq empdata
Delete statistics for all columns in the employee table of the empdata database:
statdump -zdl empdata -remployee
Files
$II_DATABASE/ingres/data/default/dbname
Default directory for database files associated with dbname. The location ii_database is mapped to this directory.