Take up the article http://blog.csdn.net/ashic/article/details/44117867
In the previous article we dump out the L1 L2 L3 block, and now let's look at the information contained in them
content |
Notes |
L1 |
First Level BITMAP BLOCK |
L2 |
SECOND level BITMAP BLOCK |
L3 (segment head) |
Pagetable SEGMENT HEADER |
Look at the dump file through the table above and we can clearly find out
In this uniform size 1M table space, there are two L1 blocks in a zone, and 1 l2,1 L3
In the first L1 block
Dump ofFirst Level Bitmap Block--------------------------------Nbits:4Nranges:1Parent DBA:0x01800082Poffset:0Unformatted: -Total - FirstUseful BLOCK:4Owning instance:1Instance ownership changed at Geneva/ -/ - -: +: -Last Successful SearchGeneva/ -/ - -: +: -Freeness STATUS:NF10Nf20Nf30Nf40Extent Map Block Offset:4294967295First free DataBlock:4Bitmap block Lock opcode9Locker XID::0x0006. 020. 00000594Dealloc SCN:2275418.0Flag:0x00000021(OBJD/-/-/-/-/HWM) Inc#: 0 objd:77412HWM FLAG:HWM Set highwater::0x01800084Ext#: 0 blk#: 4 ext size:128 #blocks in seg. HDR ' s freelists:0 #blocks below:0Mapblk0x00000000 Offset:0
The parent dba:0x01800082 table is the L2 block location that manages it
can be passed dbms_utility. Data_block_address Package comes out L1 block position
[email protected]>select dbms_utility.data_block_address_file(TO_NUMBER(‘&entervalue‘‘XXXXXXXX‘)) file_id,dbms_utility.data_block_address_block(TO_NUMBER(‘&entervalue‘‘XXXXXXXX‘fromvaluefor01800082valuefor01800082 FILE_ID BLOCK_ID---------- ---------- 6 130
Unformatted:60 total:64 First Useful block:4
Represents the unformatted block has 60, this L1 manages 64 blocks of data altogether, the first usable data block is 4th number block, namely 6th number file 132th number block
Set Highwater:: 0x01800084 ext#: 0 blk#: 4 ext size: 128
High water level first in 0x01800084 is the 132th good block of document 6th, this is because the fan table in my experiment was truncate no data, so the high watermark in the first available block
One thing to note is that the move rule for high watermark in ASSM is: When the first row is inserted in the zone, the high water point moves to the first L1 of the zone
The largest chunk of data in the block. After moving to the largest chunk of data in the second L2 block, and so on
ext#:0 Indicates the first area of the
BLK#:4 Fourth block
Ext size:128 The area consists of 128 blocks
--------------------------------------------------------DBA Ranges :--------------------------------------------------------0x01800080 Length: - Offset: 0 0: Metadata 1: Metadata 2: Metadata 3: Metadata 4: Unformatted 5: Unformatted 6: Unformatted 7: Unformatted 8: Unformatted 9: Unformatted Ten: Unformatted One: Unformatted A: Unformatted -: Unformatted -: Unformatted the: Unformatted -: Unformatted -: Unformatted -: Unformatted +: Unformatted -: Unformatted +: Unformatted A: Unformatted at: Unformatted -: Unformatted -: Unformatted -: Unformatted -: Unformatted -: Unformatted in: Unformatted -: Unformatted to: Unformatted +: Unformatted -: Unformatted the: Unformatted *: Unformatted $: Unformatted Panax Notoginseng: Unformatted -: Unformatted the: Unformatted +: Unformatted A: Unformatted the: Unformatted +: Unformatted -: Unformatted $: Unformatted $: Unformatted -: Unformatted -: Unformatted the: Unformatted -: Unformatted Wuyi: Unformatted the: Unformatted -: Unformatted Wu: Unformatted -: Unformatted About: Unformatted $: Unformatted -: Unformatted -: Unformatted -: Unformatted A: Unformatted +: Unformatted the: Unformatted--------------------------------------------------------
0x01800080 represents the location of the L1 block
can be passed dbms_utility. Data_block_address Package comes out L1 block position
[email protected]>set verify off[email protected]>select dbms_utility.data_block_address_file(TO_NUMBER(‘&entervalue‘‘XXXXXXXX‘)) file_id,dbms_utility.data_block_address_block(TO_NUMBER(‘&entervalue‘‘XXXXXXXX‘fromvaluefor01800080valuefor01800080 FILE_ID BLOCK_ID---------- ---------- 6 128
The block number is actually not a bag.
Look, we can see that we've managed 64 blocks of data, the 128~191 block, in the L1 block.
Use of >75%,50%-75%,25%-50% and <25% to mark blocks
At present, our L1 management of the 64 block 0~3 block is metadata block, that is, 128,129,130,131 pieces
4~63 These 60 blocks are data blocks with a status of unformatted unformatted
What is unformatted?
As we said in the previous article, the table ID and the segment ID are the same in the initial case
[email protected]>selectfromwhere object_name=‘FAN‘; OBJECT_ID DATA_OBJECT_ID---------- -------------- 77411 77411
The table ID does not change once it is created, but the segment ID changes, such as when the table is truncate
scott@PROD>truncate table fan;Tabletruncated.scott@PROD>select object_id,data_object_id from dba_objects where object_name=‘FAN‘OBJECT_IDDATA_OBJECT_ID------------------------ 77411 77412
After the Segment ID and table ID are different, the formatted block is the seg/obj number of the record in the block is the segment ID
Unformatted is the same as the segment ID before truncate.
You can dump an unformatted quick view of the seg/obj, compare it and know, I will not do the experiment
Keep looking at the L2 block.
The second L1 and the first L1 almost, did not say, see L2
dump of Second Level Bitmap Block number : 2 nfree: 2 ffree: 0 pdba: 0x018000 Inc class= "hljs-comment" >#: 0 objd:77412 opcode:4 xid:l1 Ranges: -------------------------------------------------------- 0x01800080 free: 5 Inst: 1 Span class= "Hljs-number" >0x01800081 free: 5 Inst: 1 -------------------------------------------------- ------
The address of the address 0x01800083 and L1 blocks of the PDBA and L3 blocks is recorded in the L2 block.
What do you mean here free:5 I don't know, ╮ (╯_╰) ╭, who knows tell me
L3 Block
Extent Control Header-----------------------------------------------------------------Extent Header:: spare1:0Spare2:0 #extents: 1 #blocks: LastMap0x00000000 #maps: 0 offset:2716Highwater::0x018000c0Ext#: 0 blk#: 4 ext size:128 #blocks in seg. HDR ' s freelists:0 #blocks below:0Mapblk0x00000000 Offset:0Unlocked--------------------------------------------------------Low Highwater Mark:highwater::0x01800084Ext#: 0 blk#: 4 ext size:128 #blocks in seg. HDR ' s freelists:0 #blocks below:0Mapblk0x00000000 Offset:0Level1BMB forHigh HWM BLOCK:0x01800080Level1BMB forLow HWM BLOCK:0x01800080
The note here is Highwater:: 0x018000c0 low Highwater Mark
: 0x01800084 low and high water level line
A block that has been formatted when the low high watermark is below
The block between the low high water level and the high water level may be formatted, or there may be no
A description of an official document
All you have to remember is that the full table scan usually reads to the low high watermark and then reads the formatted block from the low height to the high with the bitmap, avoiding the unformatted block
The easiest way to see the high watermark is the dump header block.
[email protected]>selectfromwhere segment_name=‘FAN‘and owner=‘SCOTT‘;HEADER_FILE HEADER_BLOCK----------- ------------ 6 131
The above command makes it easy to find the segment head block
--------------------------------------------------------Segment type:1 nl2:1 blksz:8192 fbsz:0 L2 ArrayStartOffset0x00001434 First Level 3BMB:0x00000000L2 Hint forInserts:0x01800082 Last Level 1BMB:0x01800081 Last LevelII BMB:0x01800082 Last LevelIII BMB:0x00000000Map Header::Next 0x00000000#extents:1obj#:77412Flag0x10000000INC #0
content |
Notes |
First Level 3 bmb:0x00000000 |
The library is large, the area is super, the block is too long to appear |
Last Level 1 bmb:0x01800081 |
The address of the last L1 BMB |
Last level II bmb:0x01800082 |
The address of the last L2 BMB |
Last level III bmb:0x0000000 |
The address of the last L3 BMB |
Extent Map ----------------------------------------------------------------- 0x01800080 length: 128
Information for the area recorded in the L3
The first zone starts from 0x01800080, but it is important to note that the full table scan is not the area map that Oracle reads.
But the following.
Auxillary Map -------------------------------------------------------- Extent 0 : L1 dba: 0x01800080 Data dba: 0x01800084 -------------------------------------------------------- Second Level Bitmap block DBAs -------------------------------------------------------- DBA 1: 0x01800082
Zone 0 first L1 for 0x01800080 first non-metadata data block is 0x01800084
Oracle full scan is based on the DBA lookup zone after "Data DBA: * *". But there is no area length, so the above section of the map information is still to be read.
Understanding the storage structure 2