Re: Hash clustering vs Indexing in ORACLE7

From: Thomas Cox <tcox_at_netcom.com>
Date: 2 Sep 92 18:04:30 GMT
Message-ID: <kxkn#_#.tcox_at_netcom.com>


ian_at_tethys.SLAC.Stanford.EDU (Ian A. MacGregor) writes:
>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...
 

>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_at_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.
Received on Wed Sep 02 1992 - 20:04:30 CEST

Original text of this message