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: Usefulness of histograms when lots of nulls

Re: Usefulness of histograms when lots of nulls

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Wed, 26 Jun 2002 11:14:34 +1000
Message-ID: <is8S8.20998$Hj3.65876@newsfeeds.bigpond.com>


Hi Thomas,

A histogram would be of no benefit in your case as you have a perfect distribution of data. The nulls should have no effect as they aren't indexed anyway. Are you sure the column is indexed and the stats are accurate ?

Post the statement and pkprof output and give someone a chance to help.

Cheers

Richard
"Thomas Gaines" <Thomas.Gaines_at_noaa.gov> wrote in message news:3D18C83F.FACEC721_at_noaa.gov...
> All -
>
> I'm having a devil of a time working through a long-running
> query, and I'm at a loss about where I should go next. The
> query in question was taken from a log of a third-party application
> (bind variables were present in the original query, and I've
> filled in realistic values for my testing), and so I have very
> limited recourse here. As I see it, about all I can do is
> build indexes, gather statistics, and set database parameters.
> I can't even use my own hints!
>
> Perhaps I'll place the individual SQL and tkprof output
> later, but right now I'm interested
> in whether or not a histogram on a particular column will help
> matters. This column is in a table of some 57,000 rows and
> is of type number(38). About
> 10% of the column's values are null. The remaining are unique
> and range from 1 to about 51300 consecutively.
>
> I'd like to give the CBO as much information as I can, but I have
> this feeling that the nulls in a particular column are simply ignored
> when CBO does its work. But I can't find this noted anywhere.
>
> Q: Given what you know, do you think that presence of a histogram
> would help the CBO in my case? If so, how many buckets would you
> recommend?
>
> Thanks very much for your assistance,
> Tom
>
>
Received on Tue Jun 25 2002 - 20:14:34 CDT

Original text of this message

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