Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Usefulness of histograms when lots of nulls
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 - 14:45:03 CDT