o To use the RMU Show Optimizer_Statistics command for a
database, you must have the RMU$ANALYZE or RMU$SHOW privilege
in the root file access control list (ACL) for the database or
the OpenVMS SYSPRV or BYPASS privilege.
o Cardinality statistics are automatically maintained by
Oracle Rdb. Physical storage and Workload statistics are only
collected when you issue an RMU Collect Optimizer_Statistics
command. To get information about the usage of Physical
storage and Workload statistics for a given query, define
the RDMS$DEBUG_FLAGS logical name to be "O". For example:
$ DEFINE RDMS$DEBUG_FLAGS "O"
When you execute a query, if workload and physical statistics
have been used in optimizing the query, you will see a line
such as the following in the command output:
~O: Workload and Physical statistics used
o Use the RMU Show Optimizer Statistics command with the
Statistics=Cardinality/Full/Threshold=n qualifier to identify
index prefix cardinality drift. This command identifies
indexes that need to be repaired. Use the RMU Collect
Optimizer_Statistics command to repair the stored index prefix
cardinality values.