Posts

Showing posts with the label create cluster

Creating Cluster tables in Oracle 11g

The flow is * First you need to create a cluster. * Then create tables that need to be clustered by using the newly created cluster. The idea of clustered table is to minimize space used by a group of tables by clustering column that occur commonly in these tables. Suppose there are 3 tables namely T1, T2, T3 and they all have a column named Emp_ID with the same values, then clustering these table using this column Emp_ID reduce space occupied by the column. This column will be stored only one time in a cluster instead of storing in 3 tables. Here is the command to create a cluster create cluster test_cluster (Emp_ID varchar2(32)); Create the tables that need to clustered by using the above created cluster. create table T1 (Col1 varchar2(100), Emp_ID varchar2(32)) cluster test_cluster(Emp_ID); create table T2 (Col1 varchar2(100), Emp_ID varchar2(32)) cluster test_cluster(Emp_ID); etc. Make sure you match the type of the cluster column a...