哦 好的 谢谢 上面 大哥 还有一个问题 我用的 solaris 10 X86 + Oracle 10g r2 结果 不能 使用 flashback table我在 以非sysdba身份登录,使用的非system表空间建立的表 每次 使用drop 表后 show recyeclibin (user_recyclebin)是空的 是不是 版本有可能有问题啊 我在 windows 安装的 oracle 哪个版本就可以 或者 是哪里设置不正确
Oracle rounded up to the next highest multiple of 40 from 96 which is 120.
16K 16K16*(150 percent of 2)=16K*1.5=24 Explanation -----------When allocating an extent Oracle first looks for a free extent of the same size we need. If this is not found then we allocate an extent that is the next multiple of (5 * db_block_size) over the specified extent size if the extent size is not already a multiple of (5 * db_block_size).Let's say you have a database with an 8K db_block_size and you create a table and specify an initial extent value of 96K. When you look in DBA_TABLES you see the actual initial extent size that you specified however if you look in DBA_EXTENTS where segment_name = '<TABLE_NAME>' you see that the actual size of the extent is 120K.This is because 96K is not a multiple of 40 (which is 5 * db_block_size) so Oracle rounded up to the next highest multiple of 40 from 96 which is 120.
查查你的recycle的参数,如下 show parameter recycle一般来说,recycle虽然是flashback里提到的,但是和flashback database是不同的实现方式,drop的表是放到recyclebin里的,而flashback database是用的flashback log来实现的,所以和flashback的开关无关,你查看recyclebin的开关就可以了。 而且,这里要注意,只有普通用户drop的表才能在recyclebin里,sys的drop表是不会在recyclebin的
next 16k 下一个大小
pctincrease 50 增加量% 这个是百分比
第二块你可以看成是增加 16*0%
第一次增加16*50% 第二次增加16*50+16*50%
create tablespace t1
extent management dictionary
storage(
intial 16k
next 16k
pctincrease 50
minextents 1
maxextents unlimited
);创建 表
create table student(id number)然后插入了 50000挑数据
第二个extent的大小等于next的初值,所以你这里next 16k,第二个extent的大小也就是16k了
而且,以后的next值是前一个next值大小乘以(1+pctincrease/100),你这里pctincrease 50,所以第三个extent的值是16+16×0.5=24k
根据上面的计算公式,如果你表内的数据扩张,需要extend新的区间的时候,第四个区间的大小应该是 24+24×0.5也就是36k,所以你这里得到40k,安装这个计算来说确实是很怪异的。其实通过这里可以看到,pctincrease影响的是从第三区开始的区间,这样设置,在以后不停的扩张区间的时候,区间越分越大,从而避免了表的离散度越来越小,区间的内容越来越大,extent是连续的block,所以数据不至于过于分散,不过缺点也是很明显的,就是这里的增长是一个阶层增长,如果extent增长过多,最好势必导致一个extent超级大,需要系统分配很大的连续空间,以至于导致没有连续空间可分配的结果。所以,有的主张是0设置,当然这里是个经验参数,你可以根据自己的实际情况来设置,但是记住有这个问题存在。对于10g来说,已经有好了存储,提出了assm的概念,所以你可以使用extent management local这样不通过数据字典而进行本地式自动管理。
每次 使用drop 表后 show recyeclibin (user_recyclebin)是空的 是不是 版本有可能有问题啊 我在 windows 安装的 oracle 哪个版本就可以 或者 是哪里设置不正确
16K16*(150 percent of 2)=16K*1.5=24
Explanation
-----------When allocating an extent Oracle first looks for a free extent of the same size
we need. If this is not found then we allocate an extent that is the next
multiple of (5 * db_block_size) over the specified extent size if the extent
size is not already a multiple of (5 * db_block_size).Let's say you have a database with an 8K db_block_size and you create a table
and specify an initial extent value of 96K. When you look in DBA_TABLES you see
the actual initial extent size that you specified however if you look in
DBA_EXTENTS where segment_name = '<TABLE_NAME>' you see that the actual size
of the extent is 120K.This is because 96K is not a multiple of 40 (which is 5 * db_block_size)
so Oracle rounded up to the next highest multiple of 40 from 96 which is 120.
查查你的recycle的参数,如下
show parameter recycle一般来说,recycle虽然是flashback里提到的,但是和flashback database是不同的实现方式,drop的表是放到recyclebin里的,而flashback database是用的flashback log来实现的,所以和flashback的开关无关,你查看recyclebin的开关就可以了。
而且,这里要注意,只有普通用户drop的表才能在recyclebin里,sys的drop表是不会在recyclebin的