Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Adding to Plan_Table
prg wrote:
> Hi,
> I am trying to optimize a query and Using PL/SQL developer for
> looking at explain plan. Looking at default goal of Optimizer ( All
> Rows ) is not the most effective way. So I change optimizer goal as
> First Rows and the query is now using indexes - Good. However how do i
> store this into plan table. I want oracle to always using optimizer
> goal as First rows in executing this kind of query.
>
> Thanks !
You are confused; PLAN_TABLE only stores the output of explain plan directives, and in no way affects the execution of the query. It simply contains a list of execution steps which the optimiser has chosen to execute a particular query. What you want to use is stored outlines. I'll refer you to the documentation which explains this in detail:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/outlines.htm#13547
Read this carefully and ensure you do not miss a step, as several init.ora parameters are set and a user privelege (CREATE ANY OUTLINE) is necessary to enable/enact stored outlines.
David Fitzjarrell Received on Mon Aug 08 2005 - 14:41:00 CDT
![]() |
![]() |