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

  1. Path: sparky!uunet!munnari.oz.au!manuel!sserve!hhcs.gov.au!pihlab
  2. From: pihlab@hhcs.gov.au
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Hash clustering vs Indexing in ORACLE7SKIP
  5. Message-ID: <1992Sep4.085237.345@hhcs.gov.au>
  6. Date: 4 Sep 92 08:52:37 +1000
  7. References: <1992Aug27.115753.1300@hermes.dlogics.com> <z9hn27.tcox@netcom.com> <5399@unixhub.SLAC.Stanford.EDU> <kxkn#_#.tcox@netcom.com>
  8. Organization: Aust. Dept. Health, Housing and Community Services
  9. Lines: 43
  10.  
  11. >>I believe hashing is only available for clusters and not for individual
  12. >>tables. 
  13. > No.
  14. >     Hashing is an optional way of storing table data to improve the
  15. >     performance of data retrieval.  To use hashing, a HASH CLUSTER
  16. >     is created and a table (or multiple tables) is loaded into the
  17. >     cluster.  The rows of a table in a hash cluster are physically
  18. >     stored and retrieved according to the results of a hash
  19. >     function.  A HASH FUNCTION is used to generate a distribution of
  20. >     numeric values, called HASH VALUES, which are based on specific
  21. >     cluster key values.  [...]
  22. >                 -- page 7-74, Oracle7 DBA Guide
  23. > So you can hash a single table.
  24.  
  25. YES, but I think what they actually mean is that you have to create a CLUSTER
  26. consisting of only one TABLE and that's the only way to use HAS INDEXES.
  27.  
  28. If you look at the syntax of the CREATE INDEX and CREATE CLUSTER commands you
  29. will notice that HASH INDEXES can only be created on CLUSTERs.
  30.  
  31. > You also mention the use of indexes for enforcing primary key
  32. > uniqueness.  You're better off defining a PRIMARY KEY constraint instead
  33. > of an index -- indexes for lookup speed; constraints for uniqueness etc.
  34. > (my interpretation of what's on p. 7-41, ibid).
  35.  
  36. The PRIMARY KEY constraint actually creates a UNIQUE Index in Oracle7 otherwise
  37. how would it ensure uniqueness (a full table scan?).  
  38.  
  39. -- 
  40.  
  41. Bruce...        pihlab @ hhcs.gov.au
  42.                  ^^
  43. *******************************************************************
  44. * Bruce Pihlamae  --  Database Administration                     *
  45. * Commonwealth Department of Health, Housing & Community Services *
  46. * Canberra, Australia                             (W) 06-289-7056 *
  47. *******************************************************************
  48. * These are my own thoughts and opinions, few that I have.        *
  49. *******************************************************************
  50.