OracleStudy之案例--Oracle数据块地址(BlockAddress)
Oracle Study之案例--Oracle 数据块地址(Block Address) Oracle访问数据是以block为单位,本文简单介绍了如何通过Block Address在内存中获取所需要的block。 DBA(data block address): A DBA is the address of an oracle data block for access purposes
Oracle Study之案例--Oracle 数据块地址(Block Address)
Oracle访问数据是以block为单位,本文简单介绍了如何通过Block Address在内存中获取所需要的block。
DBA(data block address):
A DBA is the address of an oracle data block for access purposes.
RDBA (Tablespace relative database block address):
RDBA 是相对数据块地址,是数据所在的地址,rdba可就是rowid 中rfile#+block#
ROWID:
Oracle在通过Index访问时,通过rowid确定row的位置;我们都知道rowid表示一行的物理地址,一行唯一确定一个rowid,并且在使用中一般不会改变,除非rowid之后在行的物理位置发生改变的情况下才会发生变化。需要注意的是rowid并不会真正存在于表的data block中,但是他会存在于index当中,用来通过rowid来寻找表中的行数据。
Oracle8以前一个rowid占用6个字节大小的存储空间(10bit file#+22bit block#+16bit row#),那么oracle 8以后这个rowid的存储空间扩大到了10个字节(32bit object#+10bit rfile#+22bit block#+16bit row#),所以数据库中数据库文件个数的限制从整个数据库最多只能有的2^10-1个数据文件,变为了每个表空间中可以最多有2^10-1个数据文件。
(需要注意的是:local index中存储的rowid是6个字节,而global index中存储的rowid是10个字节)
那么增加的32bit object#这个前缀主要就是用来定位表空间的,同时这个object#其实对应的就是data_object_id,由于一个段对象只能属于一个表空间,同时data_object_id就是标识了一个段的物理存储id.因此object#+rfile#就可以唯一定位当前的rowid是在那个数据文件上了。
我们可以通过dbms_rowid这个包来转换我们的rowid成不同组成部分:
dbms_rowid.rowid_object(rowid) ---> 32bit object#dbms_rowid.rowid_relative_fno(rowid) ---> 10bit rfile#dbms_rowid.rowid_block_number(rowid) ---> 22bit block#dbms_rowid.rowid_row_number(rowid) ---> 16bit row#
案例分析:
1、通过dbms_utility转换地址
10:33:59 SYS@ test1 >desc dbms_utility FUNCTION DATA_BLOCK_ADDRESS_BLOCK RETURNS NUMBER Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- DBA NUMBER IN FUNCTION DATA_BLOCK_ADDRESS_FILE RETURNS NUMBER Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- DBA NUMBER IN FUNCTION MAKE_DATA_BLOCK_ADDRESS RETURNS NUMBER Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- FILE NUMBER IN BLOCK NUMBER IN
2、通过rowid获取RDBA
11:14:36 SYS@ test1 >conn scott/tiger Connected. 11:14:39 SCOTT@ test1 >select rowid,ename from emp where rownum=1; ROWID ENAME ------------------ ---------- AAAESjAAEAAAACVAAA SMITH 11:15:05 SCOTT@ test1 >select dbms_rowid.ROWID_RELATIVE_FNO(rowid) ,dbms_rowid.ROWID_BLOCK_NUMBER(rowid) from emp where rownum=1; DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) ------------------------------------ ------------------------------------ 4 149
3、通过Dump获取block信息
11:42:16 SYS@ test1 >alter system dump datafile 4 block 149;
System altered.
Block dump
from
cache:
Dump of buffer cache
at
level
4
for
tsn=
4
, rdba=
16777365
Block dump
from
disk:
buffer tsn:
4
rdba:
0x01000095
(
4
/
149
)
scn:
0x0000.
009722f6 seq:
0x01
flg:
0x04
tail:
0x22f60601
frmt:
0x02
chkval:
0x52a5
type:
0x06
=trans data
Hex dump of block: st=
0
, typ_found=
1
Dump of memory
from
0x008E8200
to
0x008EA200
8E8200
0000A206
01000095
009722F6
04010000
[........."......]
......
Block header dump:
0x01000095
Object id
on
Block? Y
seg/obj:
0x44a3
csc:
0x00.
9722f6 itc:
2
flg: E typ:
1
- DATA
brn:
0
bdba:
0x1000090
ver:
0x01
opc:
0
inc:
0
exflg:
0
Itl Xid Uba Flag Lck Scn/Fsc
0x01
0x001b.
01f.0000007a
0x01c01c55.
0121.23
C-U-
0
scn
0x0000.
00971d50
0x02
0x0000.
000.00000000
0x00000000.
0000.00
----
0
fsc
0x0000.
00000000
bdba:
0x01000095
data_block_dump,data header
at
0x8e8264
......
block_row_dump:
tab
0
, row
0
, @
0x1f72
tl:
38
fb: --H-FL-- lb:
0x0
cc:
8
col
0
: [
3
] c2 4a
46
col
1
: [
5
]
53
4d
49
54
48
col
2
: [
5
]
43
4c
45
52
4b
col
3
: [
3
] c2
50
03
col
4

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

If you need to know how to use filtering with multiple criteria in Excel, the following tutorial will guide you through the steps to ensure you can filter and sort your data effectively. Excel's filtering function is very powerful and can help you extract the information you need from large amounts of data. This function can filter data according to the conditions you set and display only the parts that meet the conditions, making data management more efficient. By using the filter function, you can quickly find target data, saving time in finding and organizing data. This function can not only be applied to simple data lists, but can also be filtered based on multiple conditions to help you locate the information you need more accurately. Overall, Excel’s filtering function is a very practical

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

New SOTA for multimodal document understanding capabilities! Alibaba's mPLUG team released the latest open source work mPLUG-DocOwl1.5, which proposed a series of solutions to address the four major challenges of high-resolution image text recognition, general document structure understanding, instruction following, and introduction of external knowledge. Without further ado, let’s look at the effects first. One-click recognition and conversion of charts with complex structures into Markdown format: Charts of different styles are available: More detailed text recognition and positioning can also be easily handled: Detailed explanations of document understanding can also be given: You know, "Document Understanding" is currently An important scenario for the implementation of large language models. There are many products on the market to assist document reading. Some of them mainly use OCR systems for text recognition and cooperate with LLM for text processing.

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.
