Re: DBMS_SPM.LOAD_FROM_CURSOR_CACHE

From: dombrooks <dombrooks_at_hotmail.com>
Date: Wed, 12 Oct 2011 07:10:42 -0700 (PDT)
Message-ID: <c2eddc06-d10b-48e5-8857-3c1dadc453e9_at_t4g2000vby.googlegroups.com>



No need to add the dbms_output.

You can see from the dbms_xplan output in my demo that it worked - the select wasn't using a FTS and after the load is reported as using the baselined plan from the other statement.

If I do add the output then then I get "1 plans loaded from the cursor cache'.

I've uploaded an end-to-end test + output there that works in 11.2.0.2.

Can you post something similar showing it not working?

From what you posted previously, and as explained in my post above, what you were doing previously was wrong - you can't call load_plans_from_cursor_cache with the sql_id of a target statement and the plan_hash_value of a source statement. That's not how it works.

Cheers,
Dominic Received on Wed Oct 12 2011 - 09:10:42 CDT

Original text of this message