RE: is it possible to manufacture a query plan.

From: Holvoet, Jo <>
Date: Thu, 23 Feb 2012 16:49:15 +0100
Message-ID: <>

Depending on the Oracle version : stored outlines (pre 11g) or SQL plan management (dbms_spm package; 11g and up).

For stored outlines : see ML 730062.1 to see how to apply an outline with a "good" plan to another SQL statement (with a "bad" plan)

For dbms_spm : take a look in the docs for the LOAD_PLANS_FROM_CURSOR_CACHE procedure.

mvg / regards,
Jo Holvoet    

-----Original Message-----

[] On Behalf Of Dustin Hayden Sent: donderdag 23 februari 2012 16:25
Subject: is it possible to manufacture a query plan.

I have a query that can't be modified. It is a vendor supplied query. Since I can't change the query is there any way to do something like ... Hint the query and generate the query plan then somehow force the database to use this plan when the other non hinted query is run? Is there anyway do insert a query plan based on a hash id of another query?

Or any other way possible to force a similar result?


-- Received on Thu Feb 23 2012 - 09:49:15 CST

Original text of this message