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: db file scattered read

Re: db file scattered read

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Sat, 07 Aug 2004 00:35:50 -0600
Message-Id: <6.1.0.6.2.20040806235010.02dea628@pop.centrexcc.com>


I did a few tests and it appears that setting optimizer_dynamic_sampling to 4 alone doesn't cause the CBO to sample the tables at parse time:

test 1 - optimizer_dynamic_samplig=4, all tables in the query analyzed:

OPTIMIZER_DYNAMIC_SAMPLING = 4
_OPTIMIZER_DYN_SMP_BLKS = 32
...
SINGLE TABLE ACCESS PATH

*** 2004-08-07 00:02:47.639

** Performing dynamic sampling initial checks. **

Aah - finally the CBO DID sample AND use the result

...

*** 2004-08-07 00:02:47.660

** Performing dynamic sampling initial checks. **

OK - 1 out of 5 tables in the query got successfully sampled.

test 2 - deleting the statistics from one of the tables:

Now the CBO samples - and uses - statistics for 3 out of the 5 tables, including the one without statistics.

At 08:23 PM 8/6/2004, you wrote:

>In theory, setting dynamic sampling to 4 should cause Oracle 9 to sample
>statistics at parse time. Do you have any experience that it actually
>works? I have tried on occasion to set dynamic sampling at the session
>level, but unless the tables in the sql do not have statistics (in which
>case you run the risk that the CBO is bypassed for the RBO if you have
>optimizer_mode=choose => note to self to test if dynamic_sampling > 1
>changes that "rule"), I have the strong impression that the CBO in many
>cases does NOT sample statistics but simply uses the existing statistics.
>Unless you jack up the level to much higher than 4, and even then not
>always. I have to do more tests to be more certain.

Regards

Wolfgang Breitling
Centrex Consulting Corporation
http://www.centrexcc.com



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Sat Aug 07 2004 - 01:31:41 CDT

Original text of this message

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