oracle extent autoextend segment之间的关系

首先看下oracle的逻辑结构
这里写图片描述
请注意绿色的线的关系,一个segment[段]可以跨多个数据文件的。例如一张表可能存储在多个数据文件中。
一个数据文件由一个或者多个extent[区]组成。
这是表空间的管理选项

这里写图片描述

  1. 表空间 由 segments->extents->dbblock组成
    block的个数和大小由segments管理选项决定。
    一般默认的是auto的,不用制定prtfree的参数。
    如果要是手动去制定则要制定块的大小和个数,这里有严格的要求。
  2. extent和autoextend
    前者是构成表空间的元素
    autoextend选项则是表空间自动扩展的属性,所以不能混淆。

eg:

15: You executed the following command to create a tablespace called SALES_DATA:
SQL> CREATE TABLESPACE sales_data DATAFILE SIZE 100M
SEGMENT SPACE MANAGEMENTAUTO;
Which two statements are true about the SALES_DATA tablespace? (Choose two.)
选项
A.The database automatically determines the extent-sizing policy for the tablespace.
B.The segments are automatically shrunk when the contents are removed from them.
C.The allocation of extents within the tablespace is managed through the dictionary tables.
D.The space utilization description of the data blocks in segments is recorded in bitmap blocks.
E.The space utilization description of the data blocks in segments is managed through free lists.

AD

这题是考得选项的默认值,extent management的的默认选项是local.所以c是错误的。
segement的默认值是auto用的是bitmap来管理块的所以E是错误的。
prtfree 10的意思是dbblock的快用到90%则使用其他的快,它的值影响segement的大小,如果光是删除数据的话
是影响不到segement的。(牵强些的解释)

3.一个数据库可以有不同块大小的表空间,一个表空间可以有不同大小的段。

(1)不同块大小的表空间

alter system set db_16k_cache_size=1 scope=both;
SQL> create tablespace tbs_test_16
  2  datafile 'D:\APP\ORADATA\IWHM\test01.DBF' size 128m
  3  blocksize 16k;
Tablespace created.

(2)一个表空间可以有不同大小的段.

每个段至少包含8个块。

eg:
139. Which two statements are true regarding a tablespace? (Choose two.)
A.It can span multiple databases.
B.It can consist of multiple data files.
C.It can contain blocks of different sizes.
D.It can contain segments of different sizes.
E.It can contain a part of a nonpartitioned segment.

BD

c ,一个表空间应该只有一个尺寸的block,要么就是标准块要么非标准块。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值