Hi Amit, Thanks i will look in to the paper to get the info joshua On Sun, Dec 20, 2009 at 2:29 PM, joshuasingham <joshuasingham@xxxxxxxxx> wrote: > Hi all, > > I have been trying to get an idea of how oracle scale NDV(number of > distinct value ) from the sample percent in dbms_stats example if i > have a table named ok and I have traced the gather stats with sample > 1% and from the trace that it does this > > select count(*),count("NAME"),count(distinct > "NAME"),sum(sys_op_opnsize("NAME")) > ,substrb(dump(min("NAME"),16,0,32),1,120),substrb(dump(max("NAME"),16,0,32), > 1,120) > from > "SYS"."OK" sample ( 1.0000000000) t > > which output is > count(*) count("NAME") count(distinct "NAME"), > 4920 4920 4536 > > My question would be how does oracle scale the distinct sample 4536 to > the value that is store as NUM_DISTINCT in dba_tab_cols > > > Thanks in advance for the answer > > joshua > -- //www.freelists.org/webpage/oracle-l