Gathering Oracle or DB2 statistics
![]()
Tivoli®
Netcool® Performance Manager uses
the Oracle or DB2 cost-based optimizer to determine the execution
plans for the SQL queries that it uses.
Oracle or DB2 evaluates the relative cost of executing a query by using the current size of the tables involved. In order for the optimizer to determine an optimal execution plan, it needs accurate table statistics. Tivoli Netcool Performance Manager, therefore, supports a scheduled Oracle or DB2 statistics-gathering mechanism.
To activate statistics gathering, add the following command to the crontab of the DataMart owner:
0 0 * * * [ -f $PVMHOME/dataMart.env ] && . $PVMHOME/dataMart.env && dbMgr
analyzeMetaDataTables A N
The frequency of the statistics gathering is defined in the CFG_STATS table in the admin schema. Because there is cost that is associated with gathering these statistics, the database has an analysis schedule for each Tivoli Netcool Performance Manager table.
For example: dbMgr
analyzeMetaDataTables A Y
For more information about dbMgr command, see dbMgr Command Reference.