Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

65

积分

0

好友

31

主题
1#
发表于 2014-8-14 19:49:15 | 查看: 3410| 回复: 6
本帖最后由 etl2007 于 2014-8-14 23:34 编辑

因为在ASSM管理下

oracle 是通过位图方式来标示数据块的使用情况

参照
http://www.orafaq.com/wiki/ASSM

Free space tracking

Instead of trying to track the exact space inside a block (with a freelist), Oracle marks the block as one of six types, tracked by a bitmap. The 6 different "freeness statuses" are:
0 = unformatted
1 = logically full
2 = 0-25% free
3 = 25-50% free
4 = 50%-75% free
5 = 75-100% free



但我的问题 例如我现在
当我设置成PCTFREE=20%的时候,那么

3 = 25-50% free
4 = 50%-75% free
5 = 75-100% free

只有这三类才能被视为是可插入的。我之前表述不严谨,我指的可用是对插入可用

现在我需要插入一条数据,发现这 3种状态的数据块都能被插入
3 = 25-50% free
4 = 50%-75% free
5 = 75-100% free

我的问题是,oracle是选择哪一种 那一种数据块来插入呢?
麻烦指导一下

2#
发表于 2014-8-14 20:01:25
这三类都是可用的,  什么叫可用?

这三个是状态,不明白为什么说可用?

回复 只看该作者 道具 举报

3#
发表于 2014-8-14 22:27:43
Maclean Liu(刘相兵 发表于 2014-8-14 20:01
这三类都是可用的,  什么叫可用?

这三个是状态,不明白为什么说可用? ...

我理解的可用,当我设置成PCTFREE=20%的时候,那么

3 = 25-50% free
4 = 50%-75% free
5 = 75-100% free

只有这三类才能被视为是可插入的。我之前表述不严谨,我指的可用是对插入可用

现在我需要插入一条数据,发现这 3种状态的数据块都能被插入
3 = 25-50% free
4 = 50%-75% free
5 = 75-100% free

我的问题是,具体选择哪一种,oracle是如何考虑的呢?是随机吗?

回复 只看该作者 道具 举报

4#
发表于 2014-8-14 23:21:18
你的1楼的描述和3楼的描述 简直是2个问题了, 请理清描述再提问

回复 只看该作者 道具 举报

5#
发表于 2014-8-14 23:35:11
Maclean Liu(刘相兵 发表于 2014-8-14 23:21
你的1楼的描述和3楼的描述 简直是2个问题了, 请理清描述再提问

刘大大,你好
我的问题就是3楼的问题
我将问题本身也修改了,即一楼也修改了,麻烦指导一下
谢谢

回复 只看该作者 道具 举报

6#
发表于 2014-8-15 13:39:47
ODM FINDING:

Searching for Space in L1 BMB
In each L1 BMB, find the most free DBA: the L1 BMB can be treated like a 2-
dimensional grid of DBAs: 16 X n (one dimension of the grid is fixed at 16). Hashing on
the process ID provides a random block as a starting point into the L1 BMB. Starting at
this point, the Oracle server commences to build an array of five candidate blocks. Moving
down the grid in a column-first fashion the Oracle server looks at every nth block
(wrapping around the block and continuing looking at other columns). When a candidate
DBA is seen, the Oracle server attempts to get the block in a nowait mode. If there is a
process active on the block, we move on to the next candidate block. The Oracle server
only does nowait gets on DBAs five (5) times before giving up this behavior and
releasing the L1 BMB, then just waiting to get a data block pinned in exclusive mode.
This model significantly reduces buffer busy waits events in the buffer cache. If an
unformatted DBA is found, the Oracle server releases the L1 BMB, regets it in exclusive
mode, formats a range of data blocks (16), moves HWMs as appropriate and then releases
the L1 BMB. A check is performed to see if the block pinned is useful (may not be usable
due to free-space credits being exposed in the L1 BMB). If it is useful, then the space
search is complete.
Note: The second dimension of the grid is a factor of the segment size.

回复 只看该作者 道具 举报

7#
发表于 2014-8-15 13:40:58
l1 bmb.jpg

主要依据 是Hash on process ID to provide
starting point DBA,  对pid的hash值, 所以你可以认为 这是随机的

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-21 02:14 , Processed in 0.133668 second(s), 23 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569