block分配问题。

minitoy 2010-11-22 05:59:03
最近开始看concept,很多不能理解的。下面这段话什么意思?是指rac环境下block的分配问题么?求高手指教。
Although you can allocate additional extents, the blocks themselves are allocated
separately. If you allocate an extent to a specific instance, the blocks are immediately
allocated to the free list. However, if the extent is not allocated to a specific instance,
then the blocks themselves are allocated only when the high water mark moves. The
high water mark is the boundary between used and unused space in a segment.
...全文
164 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
minitoy 2010-11-23
  • 打赏
  • 举报
回复
感谢大家的回答。还是有些疑惑,回头再问,暂时结贴了。
minitoy 2010-11-22
  • 打赏
  • 举报
回复
还有就是zw1840上对这段的翻译也不是很确定。下面说明里是有待更详细的内容
minitoy 2010-11-22
  • 打赏
  • 举报
回复
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/logical.htm
下面是http://www.zw1840.com/oracle/translation/concepts/html/02.Data%20Blocks,%20Extents,%20and%20Segments.htm的翻译。
出处在用户分配一个新的数据扩展(extent)时,其中的数据块(data block)未必被同时分配。如果用户是为某个数据库对象分配数据扩展 ,那么数据块也同时被立即分配并加入可用块列表(free list)中。如果数据扩展并非专为某数据库对象分配,那么数据块只在高水位线(high water mark)移动时才被分配。高水位线是段(segment)中已用和未用空间的边界。

如果按这种理解,什么时候会出现并非为某数据库对象分配区的情况。
xman_78tom 2010-11-22
  • 打赏
  • 举报
回复
lz 的东西出自 Oracle Parallel Server Storage Considerations
http://download.oracle.com/docs/cd/A81042_01/DOC/paraserv.816/a76968/psimpstg.htm#5892

讨论的是多实例并行存储
gelyon 2010-11-22
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 yy_mm_dd 的回复:]
引用楼主 minitoy 的回复:
最近开始看concept,很多不能理解的。下面这段话什么意思?是指rac环境下block的分配问题么?求高手指教。
Although you can allocate additional extents, the blocks themselves are allocated
separately. If you allocate an extent t……
[/Quote]
当一个数据块(data block)的行目录区(row directory)空间被使用后,即使数据行被删除(delete),行目录区空间也不会被回收。举例来说,当一个曾经包含50条记录的数据块被清空后,其块头(header)的行目录区仍然占用100字节(byte)的空间。只有在数据块中插入(insert)新数据时,行目录区空间才会被 重新利用。

6楼tangren的例子就能说明
tangren 2010-11-22
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 yy_mm_dd 的回复:]

引用楼主 minitoy 的回复:
最近开始看concept,很多不能理解的。下面这段话什么意思?是指rac环境下block的分配问题么?求高手指教。
Although you can allocate additional extents, the blocks themselves are allocated
separately. If you allocate an extent ……
[/Quote]
create table tbl as select * from dba_objects;
analyze table tbl compute statistics;
select t.blocks,t.empty_blocks from user_tables t where t.table_name='TBL';
delete from tbl where rownum<10000;
alter table tbl deallocate unused;
analyze table tbl compute statistics;
select t.blocks,t.empty_blocks from user_tables t where t.table_name='TBL';
alter table tbl allocate extent (size 1m instance 1);
analyze table tbl compute statistics;
select t.blocks,t.empty_blocks from user_tables t where t.table_name='TBL';
alter table tbl deallocate unused;
analyze table tbl compute statistics;
select t.blocks,t.empty_blocks from user_tables t where t.table_name='TBL';
xman_78tom 2010-11-22
  • 打赏
  • 举报
回复

虽然可以分配扩展,但是扩展中的数据块是被独立分配的。如果将扩展分配给一个特定的实例,扩展中的数据块会立即分配到可用空间链表。但是,如果不是将扩展分配给一个特定的实例,则扩展中的数据块只有到 HWM 移动时才会被分配。 HWM 是段中已用和未用空间的界限。
YY_MM_DD 2010-11-22
  • 打赏
  • 举报
回复
[Quote=引用楼主 minitoy 的回复:]
最近开始看concept,很多不能理解的。下面这段话什么意思?是指rac环境下block的分配问题么?求高手指教。
Although you can allocate additional extents, the blocks themselves are allocated
separately. If you allocate an extent to a specific instan……
[/Quote]

以前有个帖子好像有位兄弟做个一个试验,就是在数据删除的时候最高水位没变化的例子,具体的哪个忘记了。有印象的兄弟可以贴出来共享下。。。
majy 2010-11-22
  • 打赏
  • 举报
回复
在这里,instance应该翻译为 对象, 而不是数据库实例。
YY_MM_DD 2010-11-22
  • 打赏
  • 举报
回复
大概的翻译下:
尽管你可以进行额外的区,但是块本身是被隔开分派的。如果对一个具体的对象进行分派区,那么块将会被马上分配到一个空闲时的列表中。如果扩展没有被分配给某一个具体的实例,那么块本身将在高水位移动时被分派。高水位是已使用段和空闲段的分界线。
gelyon 2010-11-22
  • 打赏
  • 举报
回复
在用户分配一个新的数据扩展(extent)时,其中的数据块(data block)未必被同时分配。如果用户是为某个数据库对象分配数据扩展 ,那么数据块也同时被立即分配并加入可用块列表(free list)中。如果数据扩展并非专为某数据库对象分配,那么数据块只在高水位线(high water mark)移动时才被分配。高水位线是段(segment)中已用和未用空间的边界。

17,382

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧