sysmod(8sql)
Name
sysmod − modify system tables to predetermined storage structures.
Syntax
sysmod [options] dbname [ tablename]...
Description
The sysmod command modifies system tables in the iidbdb database to the most appropriate storage structure, usually hash, for accelerating query processing. You should run the sysmod command on the entire database after it is created. Thereafter, run sysmod periodically on the entire database or on specific iidbdb system tables to maintain peak performance. In particular, it is important to run sysmod whenever many tables and secondary indexes have been created and/or destroyed in a database.
Options
−sAllow the ULTRIX/SQL system administrator to use sysmod on another user’s database.
+w|−w
Wait/do not wait until the database is free. The default is −w. In order to prevent errors, the sysmod command locks the database while it modifies the system tables. If the database is in use and the −w option is in effect, sysmod reports that the database is not free, and sysmod does not execute. If the database is in use and the +w is in effect, sysmod waits for the database to be free. The option to wait for a database to be free (+w) is applied only when standard input is from a terminal. The +w option does not apply when standard input is from a file, in other words, when sysmod executes in in batch mode.
Restrictions
The user who executes the sysmod command must be either the DBA for dbname or the ULTRIX/SQL system administrator (in which case, the −s flag must be specified).
Examples
Optimize all system tables in the empdata database:
sysmod empdata
If the empdata database is busy, wait for it to be free, and then optimize the iirelation and iiindexes system tables:
sysmod -w empdata iirelation iiindexes
Files
$II_DATABASE/ingres/data/default/dbname
Default directory for database files associated with dbname. The location ii_database is mapped to this directory.