DROP CLUSTER emp_dept INCLUDING TABLES;
CREATE CLUSTER emp_dept (deptno NUMBER(3))
SIZE 600
TABLESPACE users;
CREATE TABLE dept (
deptno NUMBER(3) PRIMARY KEY)
CLUSTER emp_dept (deptno);
CREATE TABLE emp (
empno NUMBER(5),
ename VARCHAR2(15) NOT NULL,
deptno NUMBER(3),
constraint emp_pk primary key(empno),
constraint emp_fk foreign key(deptno) references dept(deptno)
)
CLUSTER emp_dept (deptno);
select * from user_tables where table_name in('EMP','DEPT');
select * from dba_clusters;
CREATE INDEX emp_dept_index
ON CLUSTER emp_dept
TABLESPACE users;
select * from user_indexes where index_name ='EMP_DEPT_INDEX';