Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Creating a Hash Cluster
Hello all,
I am trying to create a Hash cluster using the following SQL in Oracle8i. All of the commands complete successfully, but I am not sure if it is setting up the cluster correctly (I'm very new to hash clusters!):
CREATE CLUSTER course_student (
courseID NUMBER(4))
SIZE 600
HASH IS courseID HASHKEYS 2000;
CREATE TABLE course (
courseID NUMBER(4) PRIMARY KEY, units NUMBER(2), courseDuration
NUMBER(1) )
CLUSTER course_student (courseID);
CREATE TABLE student (
studentID NUMBER(5) PRIMARY KEY,
age NUMBER(2) NOT NULL,
phone NUMBER(6) NOT NULL,
courseID NUMBER(4) REFERENCES course)
CLUSTER course_student (courseID);
In particular, I'm unsure of the SIZE and HASHKEYS paramaters on the CREATE
CLUSTER statement.
I made a guess because there will be a maximum of 2000 courses in the course
table.
Does this SQL look ok? Am I missing anything significant? Any opinions would be greatly appreciated.
Thanks,
Jordan.
Received on Fri Jan 17 2003 - 04:56:09 CST