动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库学院 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息



本月文章推荐
.终于知道什么叫做constraint了。.
.简单的Oracle存储过程的创建方法.
.oracle修改计算机名后重启服务失.
.技术专题总结:standby Database.
.Oracle体系结构简介.
.PL/SQL中的几种异常处理方法.
.Oracle10g 移植到 Oracle ASM.
.NT下如何彻底删除Oracle.
.Oracle 应用技巧.
.oracle管理PPT深入分析.
.查看视图中哪里字段是允许更新的.
.ORACLE没有自动增长的数据类型.
.经验总结:学好 Oracle 数据库六.
.使用RMAN进行基于时间点的不完全.
.Oracle中如何用T-SQL语句建立跟踪.
.Oracle 9i 视图.
.一条SQL语句.
.Oracle Berkeley数据库Java版.
.教你快速掌握一些经常用到的"SQL.
.关系型和后关系型数据库技术演变.

Inside Oracle9i Tablespace Management

发表日期:2008-2-9 |



  by Donald K. Burleson
  
  Over the past few releases Oracle has been automating and improving the internal administration of tables and indexes. It has gradually recognized the benefits of bitmap data strUCtures in all areas of the database. Recently, Oracle has introduced two new tablespace parameters that automate storage management functions:
  
  LMT (Locally Managed Tablespaces) — The LMT tablespace is implemented by adding EXTENT MANAGEMENT LOCAL clause to the tablespace definition. LMT tablespaces automate extent management and remove the ability to specify the NEXT storage parameter. The only exception is when NEXT is used with MINEXTENTS at table creation time.
  ASSM (Automatic Segment Space Management) — The ASSM tablespace is implemented by adding the SEGMENT SPACE MANAGEMENT AUTO clause to the tablespace definition. ASSM tablespaces automate FREELIST management and remove the ability to specify PCTUSED, FREELISTS, and FREELIST GROUPS storage parameters. You cannot use ASSM unless you also use LMTs on a tablespace.
  It is important to note that LMT and ASSM are optional and are used in the same instance with "traditional" tablespaces. Remember, LMT and ASSM are implemented at the tablespace level and each instance can have LMT, LMT and ASSM tablespaces, or traditional tablespaces.
  
  Before we discuss the differences between bitmap FREELISTS and traditional FREELIST management, let's examine how bitmap FREELISTS are implemented. We begin by creating a tablespace with the segment space management auto parameter. Note that ASSM is only valid for locally-managed tablespaces with extent management local syntax.
  
  create tablespace
  asm_test
  datafile
  'c:\oracle\oradata\diogenes\asm_test.dbf'
  size
  5m
  EXTENT MANAGEMENT LOCAL
  SEGMENT SPACE MANAGEMENT AUTO
  ;
  
  
  Once a table or index is allocated in this tablespace, the values for PCTUSED for individual objects will be ignored, and Oracle9i will automatically manage the FREELISTS for the tables and indexes inside the tablespace. For objects created in this tablespace, the NEXT extent clause is now obsolete because of the locally-managed tablespace (except when a table is created with MINEXTENTS and NEXT). The INITIAL parameter is still required because Oracle cannot know in advance the size of the initial table load. When using Automatic Space Management, the minimum value for INITIAL is three blocks.
  
  There is some debate about whether a one-size-fits-all approach is best for Oracle. In large databases, individual object settings can make a huge difference in both performance and storage. As we may know, the setting for PCTUSED governs FREELIST re-linking. If we want high disk space usage, we set PCTUSED to a value xzignthly greater than avg_row_len. Conversely, if we want fast INSERT performance, we set PCTUSED to a low value, ensuring that all free blocks are nearly empty, providing lots of block space for INSERT operations.
  
  The Issue of PCTFREE
  
  
  As a quick review, the PCTFREE parameter is used to specify the amount of free space on a data block to reserve for future row eXPansion. If PCTFREE is set improperly, SQL update statements can cause a huge amount of row fragmentation and chaining.
  
  The setting for PCTFREE is especially important where a row is initially stored small and expanded at a later time. In such systems, it is not uncommon to set PCTFREE equal to 95, telling Oracle to reserve 95 percent of the data block space for subsequent row expansion.
  
  Fortunately, Oracle9i does not allow you to specify the value for PCTFREE if you are using Automatic Space Management. Row chaining is a serious problem for the DBA, and it appears that Automatic Space Management is still appropriate for tables for which you need to reserve space for large row expansions with PCTFREE.
  
  The Issue of PCTUSED
  
  
  As we know, improper settings for PCTUSED can cause huge degradation in the performance of SQL inserts. If a data block is not largely empty, excessive I/O will happen during SQL inserts because the re-used Oracle data blocks will become full quickly. Taken to the extreme, improper settings for PCTUSED can create a situation in which the free space on the data block is smaller than the average row length for the table. In these cases, Oracle will try five times to fetch a block from the FREELIST chain. After five attempts, Oracle will raise the high-water mark for the table and grab five fresh data block for the insert.
  
  In Oracle9i with Automatic Segment Management, the PCTUSED parameter no longer governs the re-link threshold for a table data block, and we must rely on the judgment of Oracle to determine when a block is empty enough to be placed onto the FREELIST.
  
  Unlike PCTFREE, in which Oracle cannot tell in advance how much row expansion will occur, Oracle9i does have information about the right time to re-link a data block. Because Oracle knows the average row length for the table rows (dba_tables.avg_row_Len), Oracle should be able to adjust PCTUSED to ensure that the re-linked data block will have room for new rows.
  
  An Oracle Inconsistency
  
  
  While Oracle9i ignores the PCTUSED, FREELISTS, and FREELIST GROUPS parameters with LMT and ASSM tablespaces, Oracle does not give an error message when these "ignored" parameters are used in a table definition.
  
  SQL> create table
  2 test_table
  3 (c1 number)
  4 tablespace
  5 asm_test
  6 pctfree 20 pctused 30
  7 storage
  8 ( freelists 23 next 5m ) ;

  
  Table created.
  
  
  
  Most Oracle DBAs would assume that invalid parameters would be treated as they have been treated since Oracle7, and reported as an error.
  
  SQL> create index
  2 test_type_idx
  3 on
  4 book(book_type)
  5 PCTUSED 40 ;
  PCTUSED 40
  *
  ERROR at line 5:
  ORA-02158: invalid CREATE INDEX option
  
  
  
  This could lead to confusion when a DBA believes that they are changing these values when in reality, tablespaces with LMT or SAM ignore any specified values for PCTUSED, NEXT, and FREELISTS.
  
  
  No More Buffer Busy Waits
  
  
  One huge benefit of Automatic Segment Management is the bitmap FREELISTS that are guaranteed to reduce buffer busy waits. Let's take a close look at this feature.
  
  Prior to Oracle9i, buffer busy waits were a major issue. As a review, a buffer busy wait occurs when a data block is inside the data buffer cache, but it is unavailable because it is locked by another DML transaction. A block was unavailable because another SQL insert statement needed to get a block on which to place its row. Without multiple FREELISTS, every Oracle table and index had a single data block at the head of the table to manage the free block for the object. Whenever any SQL insert ran, it had to go to this block and get a data block on which to place its row.
  
  Obviously, single FREELISTS cause a backup. When multiple tasks wanted to insert into the same table, they were forced to wait while Oracle assigned free blocks, one at a time.
  
  Oracle's Automatic Segment Space Management feature claims to improve the performance of concurrent DML operations significantly since different parts of the bitmap can be used, simultaneously eliminating serialization for free space lookups.
  
  According to Oracle benchmarks, using bitmap FREELISTS removes all segment header contention and allows for super-fast concurrent insert operations (refer to figure 1).

上一篇:Oracle9i 的查询优化 人气:529
下一篇:分区和簇 人气:383
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-7-4 天空网络电影系统SKYUC v2.5.1 B
2008-7-4 PHPDug v2.0 多国语言版
2008-7-4 Drupal v7.x-dev Build 080704
2008-7-4 乐学LBBS无限级目录图片直读系统
2008-7-4 生成静态的美女小偷程序 v1.2
2008-7-4 顶级DJ舞曲网 v1.2 黑色正式版
2008-7-4 生活名片
2008-7-4 轩魂ASP中文验证码
2008-7-4 ip138手机归属地小偷
2008-7-5 AgileMessenger即时通讯工具 v1.
2008-7-5 GoodCalculator2.0版固件计算器
2008-7-5 RepoName源地址搜索工具 v1.21b
2008-7-5 AgileMessenger即时通讯工具 v1.
2008-7-5 TouchCopy多媒体管理软件 v3.13完
2008-7-5 VideosTone视频铃声 v1.1汉化破解
2008-7-5 TouchPad触摸板 v4.44破解版
2008-7-5 VideosTone破解补丁 v1.0
2008-7-5 Feeds GoogleReader客户端 v0.4.3


  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報