Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Should we stop analyzing?
Yes, it does say when dynamic sampling is evaluated or executed.
1st example is where dyn sampling is used:
*** 2003-12-31 17:25:07.521 ** Performing dynamic sampling initial checks. ** ** Dynamic sampling initial checks returning TRUE (level = 4). *** 2003-12-31 17:25:07.581 ** Generated dynamic sampling query:
query text : SELECT /*+ ALL_ROWS IGNORE_WHERE_CLAUSE */ NVL(SUM(C1),0),
NVL(SUM(C2),0) FROM (SELECT /*+ NOPARALLEL("T") */ 1 AS C1, 1 AS C2 FROM "T"
"T") SAMPLESUB
*** 2003-12-31 17:25:07.631
** Executed dynamic sampling query:
level : 4
sample pct. : 100.000000
actual sample size : 1
filtered sample card. : 1
orig. card. : 409
block cnt. : 5
max. sample block cnt. : 32
sample block cnt. : 5
min. sel. est. : -1.0000
** Using dynamic sampling card. : 1
TABLE: T ORIG CDN: 1 ROUNDED CDN: 1 CMPTD CDN: 1
Access path: tsc Resc: 3 Resp: 3
BEST_CST: 4.00 PATH: 2 Degree: 1
Second example is where dynamic sampling is considered, but eventually not used
When dyn sampling isn't even considered, then there'll be no lines about dynamic sampling in 10053 trace (except few parameter values which which are always written to trace).
Tanel.
> Wolfgang,
> I don't have 9i available at the moment so I can't test this. Just
wondering if
> a 10053 trace shows you if the statistics it is using are gathered from
dynamic
> sampling.
>
> Henry
>
>
> -----Original Message-----
> Wolfgang Breitling
> Sent: Tuesday, December 30, 2003 6:24 PM
> To: Multiple recipients of list ORACLE-L
>
>
> The CBO will do dynamic sampling automatically provided the conditions are
> met. The conditions that need to be met depend on the dynamic_sampling
> initialization parameter in effect for the session. The default is 1 which
> practically disables dynamic sampling. 0 will totally disable it but IMHO
> the conditions for dynamic_sampling=1 are so rare (in practice) that one
> can regard it as off.
> BTW, even if the CBO goes to dynamic sampling that does not guarantee that
> it will use the statistics it did gather this way.
>
> At 03:24 PM 12/30/2003, you wrote:
> >Tanel,
> >
> >I know the values, you are missing my question ... let me re-phrase it
..
> >
> >1. To have CBO use dynamic sampling do you have to specify the hint?
> >or
> >2. CBO will do that automatically?
> >
> >Just to let you know, Oracle 9ir2 docs main page is my home page on
> >Mozilla firebird browser and Metalink is my homepage on IE.
> >Raj
>
>---------------------------------------------------------------------------
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Tanel Poder INET: tanel.poder.003_at_mail.ee Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Dec 31 2003 - 09:29:33 CST