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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Which plan is better - what COST really means ?

RE: Which plan is better - what COST really means ?

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Fri, 14 Jan 2005 08:25:22 +0100
Message-ID: <2CF83791A616BB4DA203FFD13007824A01E6B15F@MSXVS02.trivadis.com>


Hi

>Dunno about the "one execution as an input to the next
>plan" but there is the SQL tuning sets,
>which is the basically the:
>
>"Mr CBO, I don't care how long as it takes, go and know=20
>yourself out finding a the best plan - get
>some more stats if you have to, do some dynamic sampling
> if needed, but make sure the information
>that comes out gives me a damn close to optimal plan"

SQL tuning sets are, AFAIK, only used as input to the SQL tuning = advisor. What you are describing is what the SQL tuning advisor do to = tune a SQL statement (this part of the advisor is called automatic SQL = tuning).

The idea of automatic SQL tuning it that the CBO takes time to analyze = the statement and the "environment", i.e. to find out if:

- statistics are missing or stale
- indexes are missing
- SQL statement can eventually be rewritten to improve performance
- CBO does wrong assumption during some cost estimation

The most important part, IMHO, is the last one. In fact the CBO tries to = partially execute the whole or just a part of the SQL statement to find = out where it is wrong. In the case it founds that it has problem with = some particular estimation a so called SQL profile is created to avoid = this problem and therefore to let the CBO do a better job.

Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 14 2005 - 01:22:40 CST

Original text of this message

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