RE: is it possible to manufacture a query plan.

From: Holvoet, Jo <jo.holvoet_at_thomascook.be>
Date: Thu, 23 Feb 2012 16:49:15 +0100
Message-ID: <CF9A39CD0F65EA49ADF70FCBF9BC2FF702FA2347_at_SW-GNETCW-MBX02.tcads.thomascook.com>



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-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Dustin Hayden Sent: donderdag 23 februari 2012 16:25
To: oracle-l_at_freelists.org
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?

--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Thu Feb 23 2012 - 09:49:15 CST

Original text of this message