home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!csus.edu!netcom.com!tcox
- From: tcox@netcom.com (Thomas Cox)
- Newsgroups: comp.databases.oracle
- Subject: Re: Hash clustering vs Indexing in ORACLE7
- Message-ID: <kxkn#_#.tcox@netcom.com>
- Date: 2 Sep 92 18:04:30 GMT
- References: <1992Aug27.115753.1300@hermes.dlogics.com> <z9hn27.tcox@netcom.com> <5399@unixhub.SLAC.Stanford.EDU>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- Lines: 41
-
- ian@tethys.SLAC.Stanford.EDU (Ian A. MacGregor) writes:
- >In article <z9hn27.tcox@netcom.com>, tcox@netcom.com (Thomas Cox) writes:
- >|> mpd@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...
-
- >I believe hashing is only available for clusters and not for individual
- >tables.
-
- No.
-
- Hashing is an optional way of storing table data to improve the
- performance of data retrieval. To use hashing, a HASH CLUSTER
- is created and a table (or multiple tables) is loaded into the
- cluster. The rows of a table in a hash cluster are physically
- stored and retrieved according to the results of a hash
- function. A HASH FUNCTION is used to generate a distribution of
- numeric values, called HASH VALUES, which are based on specific
- cluster key values. [...]
- -- page 7-74, Oracle7 DBA Guide
-
- So you can hash a single table.
-
- You also mention the use of indexes for enforcing primary key
- uniqueness. You're better off defining a PRIMARY KEY constraint instead
- of an index -- indexes for lookup speed; constraints for uniqueness etc.
- (my interpretation of what's on p. 7-41, ibid).
-
- Cheers.
- -- Tom
- --
- Tom Cox DoD #1776 '91 CB 750 Nighthawk tcox@netcom.netcom.com
- This note is my exercise of my First Amendment right to make a fool of
- myself in public. I do not speak for anyone but myself. Ever.
-