压缩索引
来源:互联网 发布:惠州网络问政被屏蔽 编辑:程序博客网 时间:2024/04/29 20:22
创建压缩索引
从串联索引中去掉冗余
压缩索引特征:
每个条目分为两项:前缀和后缀
前缀:建立在串联索引的前几列,这些列有许多值重复
后缀:索引键后几列,是前缀索引所在索引中唯一部分。
create table ind_test as select * from all_objects;
drop table id_stats;
create table id_stats as select 'compress 33333' what ,t.* from index_stats t where 1=0;
drop index ind_compress;
create index ind_compress on ind_test(owner,object_type,object_name);
analyze index ind_compress validate structure;
analyze index ind_compress compute statistics;
insert into id_stats select 'compress 0',t.* from index_stats t ;
drop index ind_compress;
create index ind_compress on ind_test(owner,object_type,object_name) compress 1;
analyze index ind_compress validate structure;
analyze index ind_compress compute statistics;
insert into id_stats select 'compress 1',t.* from index_stats t ;
drop index ind_compress;
create index ind_compress on ind_test(owner,object_type,object_name) compress 2;
analyze index ind_compress validate structure;
analyze index ind_compress compute statistics;
insert into id_stats select 'compress 2',t.* from index_stats t ;
drop index ind_compress;
create index ind_compress on ind_test(owner,object_type,object_name) compress 3;
analyze index ind_compress validate structure;
analyze index ind_compress compute statistics;
insert into id_stats select 'compress 3',t.* from index_stats t ;
官网上说是分析后压缩节省空间:但是我认为是在最佳压缩方案下,在当前基础上还能节省空间
压缩会增加CPU计算,不光光维护还有查询也是的。这需要开发者在IO和CPU计算做出一个权衡。
利用压缩能够减少该索引的缓冲块的个数,从而减少IO次数,增加CPU次数,增加对索引竞争
如果当前大量占用CPU时间,使用索引压缩会适得其反,降低查询速度
如果当前大量IO,使用压缩索引键会提高性能
- 压缩索引
- 索引压缩
- 压缩索引
- 索引压缩
- 字索引压缩
- 搜索引擎索引压缩技术
- 索引压缩问题
- (索引)压缩方法
- 索引键压缩
- 索引压缩(一)
- 索引压缩估计
- oracle 索引压缩
- 索引的压缩
- oracle 压缩索引
- 倒排索引压缩
- oracle 索引压缩
- 12.4.1 压缩索引
- 索引压缩学习总结
- HTTP Content-type头信息及文件类型对照
- COM组件 #import ; tlb, tlh, tli 文件
- 取得程序运行目录
- 经典算法
- Android中的Toast重复显示的问题
- 压缩索引
- 如何将WebRoot部署到tomcat中
- IIS6 MVC4 路由失效 无法访问
- 用哪些
- c#中的捕获派生类异常
- POJ 1083_Moving Tables 简单题
- HttpClient 访问SSL WebService 方式
- ASIC开发设计流程
- 正向代理与反向代理的区别