Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: question for the wise?

Re: question for the wise?

From: Nuno Souto <nsouto_at_optushome.com.au.nospam>
Date: Sat, 11 May 2002 01:26:41 +1000
Message-ID: <3cdbe7c1$0$15148$afc38c87@news.optusnet.com.au>


In article <R9PC8.26941$CN3.821867_at_news2.tin.it>, you said (and I quote):
> So, the original question is still there.
> Is there any way to make the SQL statement above faster avoinding hard-coded
> values?
>

Apart from simplifying the SQL even more (by re-design or re-code) which I won't go into because I don't have the time to analyze it:

1- Use bind variables.
2- If the execution plan starts changing on you (it shouldn't unless you have histograms active), then use outlines or even hard-coded stats to pin the execution plan to a constant and predictable behaviour.

Outlines can be used from 8.1.7 onward. In this release there is also a supplied package that lets you get/set the stats in a table. Snapshot the stats when they produce a good execution and reset them if someone does an analyze later on that stuffs the plans up.

-- 
Cheers
Nuno Souto
nsouto_at_optushome.com.au.nospam
Received on Fri May 10 2002 - 10:26:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US