How to move execution plan to another database using SQLHC/SQLT

One of my  query has different execution plan on both databases. One is running faster but the other is not.So I decided to move faster execution plan to slow database.

On faster database,

SQL> @sqlt/utl/coe_xfr_sql_profile.sql  SQL_ID PLAN_HASH_VALUE

This will create a script named coe_xfr_sql_profile_**SQL_ID***_***PLAN_HASH_VALUE***.sql in the local directory.

Edit this script and change the line:that starts
old force_match => FALSE
new force_match => TRUE

On the slower database,execute this script

SQL> @coe_xfr_sql_profile_***.sql

and then execute the query again and get the report and check the plan is correct.

SQL>START sqlhc.sql T sql_id


SQLHC is running online mode of SQLT

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s