ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How To Export Oracle Optimizer Statistics? [ID 903729.1]

How To Export Oracle Optimizer Statistics? [ID 903729.1]

原创 Linux操作系统 作者:spider0283 时间:2012-05-20 00:35:18 0 删除 编辑

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.
返回页首返回页首

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/38267/viewspace-730267/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-03-29

  • 博文量
    194
  • 访问量
    609454