[Oracle] 클러스터 테이블(Clustered Table) 관련 조회 쿼리

728x90

클러스터 테이블 조회

cluster_name 컬럼을 통해 연결된 클러스터 확인

col TABLE_NAME for a30

select owner, table_name, tablespace_name, cluster_name 
from dba_tables 
where owner='스키마명' 
and table_name='테이블명';

클러스터 조회

set lines 300 pages 1000
col owner for a15
col cluster_name for a30
col tablespace_name for a30

select owner, cluster_name, tablespace_name, cluster_type
from dba_clusters
where owner='스키마명' 
and cluster_name='클러스터명';

 

클러스터 인덱스 조회

table_name 클러스터명을 쓰면 됩니다.

col index_name for a30
col table_name for a30
col tablespace_name for a30

select owner, index_name, index_type, table_name, table_type, tablespace_name
from dba_indexes
where index_type='CLUSTER'
and table_name='클러스터명';
728x90