ORACLE9i_性能调优基础十一(Data Storage Structures)

Data Storage Structures

1.Heap table

2.Cluster

3.Index-organized table


集群表分为:索引集群表 和 哈希集群表

哈希集群表 适合等值查询 ,<>比较查询 要做全表扫描

Index cluster

Create cluster mycluster (deptno number(2)) size 1014;
create index myc_idx on cluster mycluster;
SQL> create table dept(deptid number(2) primary key,                        
  2  dname varchar2(20),                                                    
  3  loc varchar2(30)                                                       
  4  ) cluster mycluster(deptid)   
  
  
create table emp(                                                      
 empid number primary key,ename varchar2(20), sal number,               
 deptno number(2) references dept(deptid) 
)                            
 cluster mycluster(deptno);  


Hash Cluster

create cluster hc(hk number) hashkeys 1000 size 8192;
一般 1000这个值 会找最近的质素 。 8192 放一个, 1000个 就要 1000数据块

When to Use Clusters


Partitioning Methods


Range Partitioning Example


大于 2010-01-01都放在p3里


Hash Partitioning Overview

1.容易实现

2.并发增删改 能有更好的性能

3.不能指定数据存在哪一个分区

推荐成2的幂次方倍 更好的性能


List Partitioning Example


Composite Partitioning


Partitioned Indexes


Local partitioned Indexes


Global partitioned Indexes


none Partitioned Indexes




全局分分区索引

全局分区索引


Partition Pruning

优化器在查询前 就知道 数据在哪一个分区上



Partition-Wise Join

在Join之前就知道数据来自那些分区表


Statistics Collection


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值