Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 9i and histogram index
This sounds to me like a great reason to compute histograms. When
searching for '-1', it may be preferrable to perform a full table scan.
But when searching for one of the other distinct values, an index lookup
is most likely warranted. So a histogram is necessary to help the
optimizer distinguish this. Look in the Supplied PL/SQL Packages docs
for the DBMS_STATS package.
HTH,
Brian
jabs wrote:
>
> Hi all,
>
> I have a table with 18m rows in a data warehouse. 3 m rows have a '-1' value
> and 15 m rows have mostly distinct values. Is this a good candidate for a
> histogram index? I searched for info but couldn't find anything useful (a
> point in the direction of good documentation of this would be helpful).
> TIA,
>
> jabs.
-- =================================================================== Brian Peasland oracle_dba_at_remove_spam.peasland.com Remove the "remove_spam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three"Received on Tue Jul 08 2003 - 07:55:03 CDT
![]() |
![]() |