Monday, 20 July 2015

What Is Cluster in Oracle ?


A Cluster is a schema object used to store related information from multiple tables at stable physical location in a single data block.

  •  we need to create a cluster with cluster column then, we need to create a index on cluster column. this index is called cluster index.
  • Create the related tables and store them in a cluster by using a cluster clause.
  • use the cluster clause at theend of all column definitions in cluster tables.
EX:
===

create cluster personel1 (dept number(4))
size 512
storage (initial 100k next 50k);


cluster index:
==========

create index indx_personel1 on cluster personel1;


adding tables to a cluster:
====================

create table dept_10
cluster personel1(dept)
as select * from emp where deptno=10;

create table dept_20
cluster personel1(dept)
as select * from emp where deptno=20;

1 comment:

Query to find request set and its responsibility

  SELECT FA.application_name,        fr.responsibility_name program_attached_to,        frg.request_group_name,        fcp.request_set_name,...