Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Re: copy export plan from one database to another

Wolfgang Breitling

2004-03-04

Replies:

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@(protected)
>---------------------------------------------------------------------------------------------------------------------------
>
>

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@(protected)
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


©2008 dba.5341.com - Jax Systems, LLC, U.S.A.