Re: copy export plan from one database to another

  • From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 04 Mar 2004 07:36:46 -0700

copy the statistics from the dev/tst database to production:

1) on dev/tst run dbms_stats.export_schema_stats:
you need to create the stattab table if you have not already done so
supply a value for statid or else it can take hours
2) export the stattab table on dev/tst using the export utility
3) import the stattab table into production using the import utility
4) selectively import the statistics for tables used in sql with performance problems since the latest statistics gathering:
dbms_stats.import_table_stats(... statid=> ... cascade=>true)


In future have the dbms_stats.gather procedure save the current statistics to the stattab table before replacing them with the new statistics. Then you do not need steps 1-3 above.
Remember - the first mantra for a dba should be "always know how to back out what you are doing".


At 04:45 PM 3/3/2004, you wrote:

Hi there,

We are in a bit of a panic right now, and I am busily searching the manuals,

But is it possible to copy the explain plan that looks good in your dev/test database to the production
database and force your production database to use that explain plan ??


I will figure out what went wrong with the production plan once the panic is over.

Thanks

Darren

--------------------------------------------------------------------------------------------------------------------------

Darren Browett P.Eng This message was transmitted
Data Administrator using 100% recycled electrons
Information and Communication Technology
City of Coquitlam
P:(604)927 - 3614
E:dbrowett@xxxxxxxxxxxx
---------------------------------------------------------------------------------------------------------------------------




Wolfgang Breitling
Oracle7, 8, 8i, 9i OCP DBA
Centrex Consulting Corporation
http://www.centrexcc.com



---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------

Other related posts: