The syntax for optdiag is:
optdiag [binary] [simulate] statistics {-i input_file | database[.owner[.table[.partition [.column]]]] [-o output_file]} [-U user_name] [-P password] [-I interfaces_file] [-S server] [-v] [-h] [-s] [-T flag_value] [-z language] [-J client_charset] [-a display_charset]
Use optdiag to display statistics for an entire database, for a single table and its indexes and columns, or for a particular column.
For example, display statistics for all user tables in the pubtune database, placing the output in the pubtune.opt file, use:
optdiag statistics pubtune -Usa -Ppasswd -o pubtune.opt
To display statistics for the titles table and for any indexes on the table, use:
optdiag statistics pubtune..titles -Usa -Ppasswd -o titles.opt
For optdiag output from a slice table from an Adaptive Server® version earlier than 15.0, data is loaded according to the destination table’s schema:
The destination table is a single-partition table – optdiag loads the table using the standard method, ignoring the “Pages in largest partition” field.
The destination table is a multipartition table and the “Pages in the largest partition” field is empty – optdiag loads the statistics into the first partition.
The “Pages in largest partition” field is not empty – optdiag uses the value in this field to divide the values proportionally for the “Data page count,” and “Data row count” fields into all partitions. optdiag always loads column-level statistics into the global statistics for columns.
See the Utility Guide for complete information about optdiag. The following sections provide information about optdiag output.