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: 10g CBO and how to determine cardinality on INDEX_FFS?

Re: 10g CBO and how to determine cardinality on INDEX_FFS?

From: peter <p_msantos_at_yahoo.com>
Date: 18 Nov 2005 22:52:46 -0800
Message-ID: <1132383166.310808.77440@g47g2000cwa.googlegroups.com>


So the cost makes sense..

(LEAF_BLKS/MBRC) * (MREADTIM/SREADTIM)
 +
#CPUCycles / (cpuspeed * sreadtim_in_microseconds)

IOCOST = (39550/125) * (26.806/4.245) = 1997.97842 +
CPUCOST= 281652952 / (198 * (4.245*1000)) = 335.097681 = 2333.0761 which is very close to 2335 as calculated by the optimizer.

I'm still having some difficulties calculating the cardinality though. This is probably since I have a histogram on the product_id column. I've checkout
chapter 7 on histograms, but can't make the numbers add up.

This is what's currently in my user_tab_histograms view. There are only 2 values for product_id in that table.

ENDPOINT_NUMBER|ENDPOINT_VALUE
---------------|--------------

 1354519|     430657811
 1943369|     438075481

if you have a moment, any additional hints would be greatly appreciated.
I think I'm still not sure of what are the standard rules for calculating the
cardinality on columns with frequency histograms.

thanks again
--peter Received on Sat Nov 19 2005 - 00:52:46 CST

Original text of this message

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