home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / oracle / 1469 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  2.0 KB

  1. Path: sparky!uunet!olivea!decwrl!csus.edu!netcom.com!tcox
  2. From: tcox@netcom.com (Thomas Cox)
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Hash clustering vs Indexing in ORACLE7
  5. Message-ID: <kxkn#_#.tcox@netcom.com>
  6. Date: 2 Sep 92 18:04:30 GMT
  7. References: <1992Aug27.115753.1300@hermes.dlogics.com> <z9hn27.tcox@netcom.com> <5399@unixhub.SLAC.Stanford.EDU>
  8. Organization: Netcom - Online Communication Services (408 241-9760 guest)
  9. Lines: 41
  10.  
  11. ian@tethys.SLAC.Stanford.EDU (Ian A. MacGregor) writes:
  12. >In article <z9hn27.tcox@netcom.com>, tcox@netcom.com (Thomas Cox) writes:
  13. >|> mpd@hermes.dlogics.com writes:
  14.  
  15. >|> >Anybody used hash clustering in place of indexing?
  16. >|> >Am considering it for a new app, and am wading through zillions of
  17. >|> >pros and cons.
  18.  
  19. >|> >Thanks in advance...
  20.  
  21. >|> Why "in place of" -- I was under the impression you can do both.  Though
  22. >|> I have no idea what trade-offs _that_ entails...
  23.  
  24. >I believe hashing is only available for clusters and not for individual
  25. >tables. 
  26.  
  27. No.
  28.  
  29.     Hashing is an optional way of storing table data to improve the
  30.     performance of data retrieval.  To use hashing, a HASH CLUSTER
  31.     is created and a table (or multiple tables) is loaded into the
  32.     cluster.  The rows of a table in a hash cluster are physically
  33.     stored and retrieved according to the results of a hash
  34.     function.  A HASH FUNCTION is used to generate a distribution of
  35.     numeric values, called HASH VALUES, which are based on specific
  36.     cluster key values.  [...]
  37.                 -- page 7-74, Oracle7 DBA Guide
  38.  
  39. So you can hash a single table.
  40.  
  41. You also mention the use of indexes for enforcing primary key
  42. uniqueness.  You're better off defining a PRIMARY KEY constraint instead
  43. of an index -- indexes for lookup speed; constraints for uniqueness etc.
  44. (my interpretation of what's on p. 7-41, ibid).
  45.  
  46. Cheers.
  47.     -- Tom
  48. -- 
  49. Tom Cox      DoD #1776   '91 CB 750 Nighthawk   tcox@netcom.netcom.com
  50.  This note is my exercise of my First Amendment right to make a fool of
  51.  myself in public.  I do not speak for anyone but myself.  Ever.
  52.