ORACLE9i_性能调优基础十(Oracle Blocks Efficiently)
2015-04-25 13:47
369 查看
Avoiding Dynamic Allocation
<p>要执行收集信息</p><pre class="sql" name="code">exec dbms_stats.gather_table_stats('MARK','T');
analyze table t coumpute statistics;
select owner,table_name,blocks,empty_blocks from dba_tables where empty_blocks/(blocks+empty_blocks)< .1
<span style="font-size:18px;">To avoid dynamic allocation</span>
alter table hr.employees allocate extent;
Advantage and disadvantage of Large Extents
Advantage: 减少分配次数 ,性能稍微有点提高,一次I/O 就能读整个 extent mapaisadvantage:小空间可能不被利用
Recovring Space
1.Below the high-water mark:a.把表导出 ,drop or truncate 原表,把数据导回原表
b.Alter Table employees move
2.Above the high-water mark: alter table employees Deallocate Unused
Minimize block visits by
用大尺寸的数据块,装数据紧凑些 , 防止 row migration小块: 优点:减少BLOCK 竞争 ,对小记录比较好 ,对 随机访问比较好
缺点:额外开销多(每个块都有控制信息) ,一个块容纳的记录条数少, 索引的块就多
大块:小块相反的方面
一般 OLAP使用大块 , OLTP使用小块
Detecting M&C
1.
analyze table oe.orders compute STATISTICS; select num_row,chain_cnt from dba_tables where table_name='ORdERS';
2.通过Statspack报告 也可以查看
找到那些记录发生M&C
Index Reorganization
1.易变表上索引的问题2.只有索引所在块的 全部无效 这个块 才能被回收
相关文章推荐
- ORACLE9i_性能调优基础二(Database Configuration and IO Issues)
- ORACLE9i_性能调优基础八(SQL tuning)
- ORACLE9i_性能调优基础四(Buffer Cache )
- ORACLE9i_性能调优基础五(Sizing Other SGA structures)
- ORACLE9i_性能调优基础十二(Application Tuning)
- ORACLE9i_性能调优基础一(Diagnostic and Tuning Tools)
- Oracle基础性能调优
- ORACLE9i_性能调优基础九(Managing Statistics)
- ORACLE9i_性能调优基础六(Optimizing Sort Operations)
- ORACLE 性能调优基础--OWI
- ORACLE9i_性能调优基础三(Tuning the Shared Pool)
- ORACLE9i_性能调优基础七(Using Resource Manager)
- ORACLE9i_性能调优基础十一(Data Storage Structures)
- ORACLE9i_性能调优基础十三(Materialized Views)
- ORACLE9i_性能调优基础十四(LOCK)
- 通向架构师的道路(第二十四天)之Oracle性能调优-朝拜先知之旅
- 提示、模式-oracle 性能调优之 管理操作系统之解决操作系统问题-by小雨
- oracle性能调优之--Oracle 硬解析与软解析
- Redis 基础、高级特性与性能调优
- Oracle性能调优方法详解