Re: Hash clustering vs Indexing in ORACLE7

From: Ian A. MacGregor <ian_at_tethys.SLAC.Stanford.EDU>
Date: 1 Sep 92 15:15:19 GMT
Message-ID: <5399_at_unixhub.SLAC.Stanford.EDU>


In article <z9hn27.tcox_at_netcom.com>, tcox_at_netcom.com (Thomas Cox) writes:
|> mpd_at_hermes.dlogics.com writes:
|> >Anybody used hash clustering in place of indexing?
|> >Am considering it for a new app, and am wading through zillions of
|> >pros and cons.
 

|> >Thanks in advance...
|>
|> Why "in place of" -- I was under the impression you can do both. Though
|> I have no idea what trade-offs _that_ entails...

|>
|> Cheers.
|> -- Tom
|> --
|> Tom Cox DoD #1776 '91 CB 750 Nighthawk tcox_at_netcom.netcom.com
|> My opinions! Mine! Not those of Netcom, or Oracle, or anybody else I know...

I believe hashing is only available for clusters and not for individual tables. Hashing is faster for queries with predicates that do not include range scans. Range scans are more efficiently handled by B-Trees. Another problem is that hash functions do not guarnatee uniqueness; thus they are unsuitable for use as peimary keys in a table. Oracle does allow you to have both a hash and an index on your cluster key. It will use the hash for "=" queries and the B-Tree for range scans. There have been rumors about Oracle allowing hashing of individual table keys in the future, but I have heard no official statement from them.

                          
                          Ian MacGregor
                          Stanford Linear Accelerator Center
                          IAN_at_SLAC.STANFORD.EDU
                          (415) 926-3528
Received on Tue Sep 01 1992 - 17:15:19 CEST

Original text of this message