Bit map block in the the measurement uniform size of the table space 1 bit can manage to how much space

Previous article, has been discussed in the automatically assigned locally managed tablespaces, 1 bit in the bit map block can manage how much space measure in the space of locally managed tablespaces of uniform size, bit map block 1 bit can manage how much space.

SQL> show parameter block_size

NAME TYPE VALUE
————————————————– ———
db_block_size integer 8192

SQL> select * from v $ version;

BANNER
————————————————– ————–
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – Prod
PL / SQL Release 10.2.0.3.0 – Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 – Production
NLSRTL Version 10.2.0.3.0 – Production

SQL> create tablespace lmt datafile ‘C :/ ORACLE/PRODUCT/10.2.0/ORADATA/ROBINSON/DATAFILE/lmt.dbf’ size 100m
2 extent management local uniform size 1m;

Tablespace created

SQL> create table test tablespace lmt as select * from dba_objects;

Table created

SQL> select segment_name, tablespace_name, header_file, header_block, blocks from dba_segments where tablespace_name = ‘LMT’;

SEGMENT_NA TABLESPACE_NAME HEADER_FILE HEADER_BLOCK BLOCKS
————————————————– ————-
TEST LMT 6 12 768

LMT table space, you can see the table test file number 6, the first paragraph of 12

SQL> alter system dump datafile 6 block min 1 block max 12;
The system has been changed.

Part of the dump file

Start dump data blocks tsn: 10 file #: 6 minblk 1 maxblk 12
Block 1 (file header) not dumped: use dump file header command
buffer tsn: 10 rdba: 0x01800002 (6/2)
scn: 0x0000.001d400c seq: 0x02 flg: 0x04 tail: 0x400c1d02
frmt: 0x02 chkval: 0xbbd8 type: 0x1d = KTFB Bitmapped File Space Header
Hex dump of block: st = 0, typ_found = 1
Dump of memory from 0x08127800 to 0x08129800
8127800 0000A21D 01800002 001D400C 04020000 [……… @ ……]
8127810 0000BBD8 00000006 00000080 00003200 […………. 2 ..]
812,782,000,000,001 00000000 0,000,000,000,000,007 […………….]
8127830 00003188 00000006 0000005D 00000000 [.1 ……] …….]
812,784,000,000,000 00000000 00000000 00000000 […………….]
812,785,000,000,289 0,000,008,000,000,000 00000000 […………….]
812,786,000,000,000 00000000 00000000 00000000 […………….]
Repeat 504 times
81297F0 00000000 00000000 00000000 400C1D02 […………… @]
File Space Header Block:
Header Control:
RelFno: 6, Unit: 128, Size: 12800, Flag: 1
AutoExtend: NO, Increment: 0, MaxSize: 0
Initial Area: 7, Tail: 12680, First: 6, Free: 93
The deallocation SCN: 0.0
Header Opcode:
Save: No Pending Op
buffer tsn: 10 rdba: 0x01800003 (6/3)
scn: 0x0000.001d400c seq: 0x01 flg: 0x04 tail: 0x400c1e01
frmt: 0x02 chkval: 0x4e4c type: 0x1e = KTFB Bitmapped File Space Bitmap
Hex dump of block: st = 0, typ_found = 1
Dump of memory from 0x08127800 to 0x08129800
8127800 0000A21E 01800003 001D400C 04010000 [……… @ ……]
8127810 00004E4C 00000006 00000009 00000000 [LN …………..]
8127820 00000006 0000F7FA 00000000 00000000 […………….]
8127830 00000000 00000000 0000003F 00000000 [……..? …….]
812,784,000,000,000 00000000 00000000 00000000 […………….]
Repeat 506 times
81297F0 00000000 00000000 00000000 400C1E01 […………… @]
File Space Bitmap Block:
Bitmap Control:
RelFno: 6, BeginBlock: 9, Flag: 0, First: 6, Free: 63482 —– 6 management space
3F00000000000000 0000000000000000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000000

…………………………… Omitted certain …………… ………….

buffer tsn: 10 rdba: 0x01800009 (6/9) —– Note, Oracle set aside the same the six block to manage the free space, two one-bit block 9,10
scn: 0x0000.001d400f seq: 0x03 flg: 0x04 tail: 0x400f2003
frmt: 0x02 chkval: 0x4a4a type: 0x20 = FIRST LEVEL BITMAP BLOCK
Note that there are two one-bit block, a 9, a 10, 11 for the two-bit block, 12 for the first paragraph.

You can see First = 6, then guess what, on behalf of the six-what?

SQL> select count (*) from dba_extents where tablespace_name = ‘LMT’;

COUNT (*)
———-
6

Interval number equal to 6, so I guess 1 bit represents an extent, to continue the experiment

SQL> insert into test select * from dba_objects nologging;

49962 rows inserted
SQL> commit;

Commit complete

SQL> select count (*) from dba_extents where tablespace_name = ‘LMT’;

COUNT (*)
———-
11

Range increased to 11

SQL> alter system dump datafile 6 block 3;

The system has been changed.

DUMP file:

Start dump data blocks tsn: 10 file #: 6 minblk 3 maxblk 3
buffer tsn: 10 rdba: 0x01800003 (6/3)
scn: 0x0000.001d42f6 seq: 0x01 flg: 0x00 tail: 0x42f61e01
frmt: 0x02 chkval: 0x0000 type: 0x1e = KTFB Bitmapped File Space Bitmap
Hex dump of block: st = 0, typ_found = 1
Dump of memory from 0x04807800 to 0x04809800
4807800 0000A21E 01800003 001D42F6 00010000 [……… B. …..]
480,781,000,000,000 0,000,000,600,000,009 00000000 […………….]
4807820 0000000B 0000F7F5 00000000 00000000 […………….]
4807830 00000000 00000000 000007FF 00000000 […………….]
480,784,000,000,000 00000000 00000000 00000000 […………….]
Repeat 506 times
48097F0 00000000 00000000 00000000 42F61E01 […………… B]
File Space Bitmap Block:
Bitmap Control:
RelFno: 6, BeginBlock: 9, Flag: 0, First: 11, Free: 63477
FF07000000000000 0000000000000000 0000000000000000 0000000000000000

First = 11 means that 11 bits,

Therefore we can say locally managed tablespaces of uniform size, 1 bit in the bit map block an extent, so the bit can manage how much space that you set.

Posted by databasesql