How To Export Oracle Optimizer Statistics? [ID 903729.1]

In this Document
  Goal
  Solution


Applies to:

Primavera P6 Enterprise Project Portfolio Management - Version: 5.0 and later   [Release: 5.0 and later ]
All Platforms
***Checked for relevance on 30-Sept-2011***

Goal

Cost Based Optimzation (CBO) depends on correct statistics in a database to run queries efficiently.  If the statistics are missing or stale, bad execution plans can be generated leading into slow execution of queries. Support may require a customer to send in their optimizer statistics to be analyzed if query performance is causing issues in the software. 

Solution

To obtain an Oracle export / dump of the optimizer statistics of a Primavera database follow these steps (only necessary when sending in the statistics to Oracle|Primavera):

  1. In SQLPLUS execute the following query to create a table names STATS (if the table does not exist already):

    exec dbms_stats.create_stat_table('ADMUSER', 'STATS');


  2. In SQLPLUS execute the following query to populate the STATS table with the optimzer statistics:

    exec dbms_stats.export_schema_stats('ADMUSER', 'STATS');


  3. From a DOS command prompt on the Oracle Database Server or client run the following statement to export out the STATS table:

    exp admuser/@ tables=stats file=\stats_dump.dmp

  4. Send the stats_dump.dmp to Oracle Customer Support.
返回页首返回页首
请使用浏览器的分享功能分享到微信等