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: histograms

Re: histograms

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sun, 29 Aug 2004 11:57:20 +0000 (UTC)
Message-ID: <cgsgb0$2ho$1@titan.btinternet.com>

Oracle probably created the histogram because there were no statistics to tell it not to and no clues about prior use of the columns. For small test cases, the internal code seems to run a test query to generate a "height-balanced" histogram - and then decide not to store it. However, in the case of the 5 distinct values, Oracle determines that the number of distinct values is small and also runs the code for a "value based" histogram, and stores the results.

-- 
Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html
The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html
Optimising Oracle Seminar - schedule updated July 27th




"Oradba Linux" <techiey2k3_at_comcast.net> wrote in message
news:sHbXc.184007$8_6.108589_at_attbi_s04...

> Using DBMS_STATS to estimate statistics on a table . I created a table
with
> 50,000 rows and it has one index . That column
> has 5 distinct values . I ran a command to estimate statistics on that
table
> with skewonly option . It still went ahead and
> created histograms . I was under the impression that since data
distribution
> is not skewed it will not create histograms .
> Secondly , how does it know that data distribution is skewed or not skewed
> using column stats generated .
>
> I also want an opinion on how to decide whether to gather column stats for
> all columns or just for indexed columns .
> How to decide ?
>
>
>
Received on Sun Aug 29 2004 - 06:57:20 CDT

Original text of this message

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