Re: sample size NDV scaleup
Date: Sun, 20 Dec 2009 23:11:47 +0800
Message-ID: <74e7b3b00912200711q48801d88oc6b6ac36e882b2de_at_mail.gmail.com>
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_at_gmail.com> 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
>
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Dec 20 2009 - 09:11:47 CST