oracle管理之 cluster(server.102 b14231)
cluster多用在 經常需要連立的表上
優點:減少io;節省儲存空間
cluster key column 一定要有合理的區分度,最好一個key 的row能儲存在一個data block中
CREATE CLUSTER emp_dept (deptno NUMBER(3))
SIZE 600
TABLESPACE users
STORAGE (INITIAL 200K
NEXT 300K
MINEXTENTS 2
MAXEXTENTS 20
PCTINCREASE 33);
CREATE TABLE emp (
empno NUMBER(5) PRIMARY KEY,
ename VARCHAR2(15) NOT NULL,
. . .
deptno NUMBER(3) REFERENCES dept)
CLUSTER emp_dept (deptno);
CREATE TABLE dept (
deptno NUMBER(3) PRIMARY KEY, . . . )
CLUSTER emp_dept (deptno);
CREATE INDEX emp_dept_index
ON CLUSTER emp_dept
TABLESPACE users
STORAGE (INITIAL 50K
NEXT 50K
MINEXTENTS 2
MAXEXTENTS 10
PCTINCREASE 33);
A cluster index must be created before any rows can be inserted into any clustered
table.
DROP CLUSTER emp_dept;
DROP CLUSTER emp_dept INCLUDING TABLES;
DROP CLUSTER emp_dept INCLUDING TABLES CASCADE CONSTRAINTS;
--cluster相關檢視
DBA_CLUSTERS
ALL_CLUSTERS
USER_CLUSTERS
DBA_CLU_COLUMNS
USER_CLU_COLUMNS
DBA_CLUSTER_HASH_EXPRESSIONS
ALL_CLUSTER_HASH_EXPRESSIONS
USER_CLUSTER_HASH_EXPRESSIONS[@more@]
優點:減少io;節省儲存空間
cluster key column 一定要有合理的區分度,最好一個key 的row能儲存在一個data block中
CREATE CLUSTER emp_dept (deptno NUMBER(3))
SIZE 600
TABLESPACE users
STORAGE (INITIAL 200K
NEXT 300K
MINEXTENTS 2
MAXEXTENTS 20
PCTINCREASE 33);
CREATE TABLE emp (
empno NUMBER(5) PRIMARY KEY,
ename VARCHAR2(15) NOT NULL,
. . .
deptno NUMBER(3) REFERENCES dept)
CLUSTER emp_dept (deptno);
CREATE TABLE dept (
deptno NUMBER(3) PRIMARY KEY, . . . )
CLUSTER emp_dept (deptno);
CREATE INDEX emp_dept_index
ON CLUSTER emp_dept
TABLESPACE users
STORAGE (INITIAL 50K
NEXT 50K
MINEXTENTS 2
MAXEXTENTS 10
PCTINCREASE 33);
A cluster index must be created before any rows can be inserted into any clustered
table.
DROP CLUSTER emp_dept;
DROP CLUSTER emp_dept INCLUDING TABLES;
DROP CLUSTER emp_dept INCLUDING TABLES CASCADE CONSTRAINTS;
--cluster相關檢視
DBA_CLUSTERS
ALL_CLUSTERS
USER_CLUSTERS
DBA_CLU_COLUMNS
USER_CLU_COLUMNS
DBA_CLUSTER_HASH_EXPRESSIONS
ALL_CLUSTER_HASH_EXPRESSIONS
USER_CLUSTER_HASH_EXPRESSIONS[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70612/viewspace-1025152/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 之 CLUSTER_INTERCONNECTS is not set to the recommended valueOracle
- Oracle Cluster Time ManagementOracle
- Oracle ASM Cluster File Systems (ACOracleASM
- Oracle cluster table(1)_概念介紹Oracle
- Split Brain in Oracle Clusterware and Real Application ClusterAIOracleAPP
- 14_深入解析Oracle table cluster結構Oracle
- Redis服務之Redis ClusterRedis
- 玩轉Redis叢集之ClusterRedis
- dubbo原始碼分析之叢集Cluster原始碼
- oracle RAC dbca的時候報錯提示cluster nodes are not accessibleOracle
- kubernetes生產實踐之redis-clusterRedis
- oracle 12C RAC 12.1.0.2 叢集日誌(cluster log)目錄Oracle
- Oracle 任務管理之 ----program(程式)---scheduler(計劃)--Job(任務)Oracle
- oracle job管理(zt)Oracle
- mysql之 Percona XtraDB Cluster叢集執行緒模型MySql執行緒模型
- redis.cluster/memcached.cluster/wmware esxiRedis
- cluster meet
- MySQL ClusterMySql
- oracle 使用者管理Oracle
- Oracle:PDB 引數管理Oracle
- Oracle DG管理Broker配置Oracle
- Oracle OCP(58):ARCHIVELOG 管理OracleHive
- Oracle OCP(21):管理表Oracle
- ORACLE 概要檔案管理Oracle
- Oracle RAC啟動歸檔時需要設定CLUSTER_DATABASE引數嗎?OracleDatabase
- 系統管理指南:Oracle Solaris Containers-資源管理和 Oracle Solaris ZonesOracleAI
- ORACLE基礎之oracle鎖(oracle lock mode)詳解Oracle
- Oracle之結構Oracle
- 【SCRIPT】Oracle表管理段管理常用語句Oracle
- cilium Cluster Mesh
- 部署Kubernetes Cluster
- Redis Cluster 3.0Redis
- redis cluster 搭建Redis
- Redis Cluster原理Redis
- 【LOB】Oracle Lob管理常用sqlOracleSQL
- Oracle listener log配置與管理Oracle
- 【BLOCK】Oracle 塊管理常用SQLBloCOracleSQL
- 【TUNE_ORACLE】Oracle Hint之概念與用法Oracle
- akka-typed(6) - cluster:group router, cluster-load-balancing