PCTFREE和PCTUSED是什么概念?

解决方案 »

  1.   

    不知道楼主对块有概念吗?
    这里块里面两个重要的属性
    pctfree 标示要留多少空间,一般默认参数是20,表示留20%
    即当块里的数据达到80%里,就不会往这个块里写新数据PCTUSED则是指当块里的数据低于多少百分比里可以写新数据,一般默认是40,即40%
    当数据低于40%里可以写入新的数据
      

  2.   

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/logical.htm#sthref347The PCTFREE parameter sets the minimum percentage of a data block to be reserved as free space for possible updates to rows that already exist in that block. For example, assume that you specify the following parameter within a CREATE TABLE statement:PCTFREE 20 This states that 20% of each data block in this table's data segment be kept free and available for possible updates to the existing rows already within each block. New rows can be added to the row data area, and corresponding information can be added to the variable portions of the overhead area, until the row data and overhead total 80% of the total block size.The PCTUSED Parameter
    The PCTUSED parameter sets the minimum percentage of a block that can be used for row data plus overhead before new rows are added to the block. After a data block is filled to the limit determined by PCTFREE, Oracle considers the block unavailable for the insertion of new rows until the percentage of that block falls beneath the parameter PCTUSED. Until this value is achieved, Oracle uses the free space of the data block only for updates to rows already contained in the data block. For example, assume that you specify the following parameter in a CREATE TABLE statement:PCTUSED 40 In this case, a data block used for this table's data segment is considered unavailable for the insertion of any new rows until the amount of used space in the block falls to 39% or less (assuming that the block's used space has previously reached PCTFREE).
      

  3.   

    举例说明下
    假设你一个块可以存放100个数据
    当存放到80个时,就不能存放新的数据,这是受pctfree来控制,预留的空间是给UPDATE用的
    当你删除一个时,再想放个新数据行不行?
    回答是不行,必须是删除41个,即低于40个以后才能插入新的数据的,这是受pctused来控制的