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

Home -> Community -> Mailing Lists -> Oracle-L -> density calculation when histograms are involved

density calculation when histograms are involved

From: LS Cheng <exriscer_at_gmail.com>
Date: Thu, 13 Sep 2007 19:28:11 +0200
Message-ID: <6e9345580709131028r489663br206cfdf1ffedd0c6@mail.gmail.com>


Hi

Does any one know in Oracle 9.2 when histograms are involved how is density calculated? Without histograms is 1/NDV but I cant find a suitable way to find the density when there are histograms.

This question is because I have a 10053 trace file with this:

SINGLE TABLE ACCESS PATH

Column: COD_C  Col#: 2      Table: EMP_CL   Alias: CL
    NDV: 3         NULLS: 0         DENS: 4.0526e-09
    FREQUENCY HISTOGRAM: #BKT: 37012907 #VAL: 3
Column: COD_A  Col#: 3      Table: EMP_CL   Alias: CL
    NDV: 2         NULLS: 0         DENS: 4.0526e-09
    FREQUENCY HISTOGRAM: #BKT: 37012907 #VAL: 2
  TABLE: EMP_CL     ORIG CDN: 123376357  ROUNDED CDN: 442543  CMPTD CDN:
442543
  Access path: tsc Resc: 35875 Resp: 35875   BEST_CST: 35875.00 PATH: 2 Degree: 1

The query should returns around 3 million rows but I dont understand how the computed cardinality is 442543? I suspect it calculates that using density which shows 4.0526e-09
!

Thanks

--

LSC
--

http://www.freelists.org/webpage/oracle-l Received on Thu Sep 13 2007 - 12:28:11 CDT

Original text of this message

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