Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: (long) Locally managed tablespace bitmap structure

RE: (long) Locally managed tablespace bitmap structure

From: Madhavan Amruthur <mad012000_at_hotmail.com>
Date: Tue, 19 Dec 2000 15:44:18 -0800
Message-Id: <10715.124973@fatcity.com>


Hi all,
Sorry for the long mail.

I had a question regarding the extent tracking that is done by the bitmap structure for a locally managed tablespace.

For a 4K block size database,
the 1st block of the datafile is the datafile header. the 2nd block is the Bitmapped File Space Header 3rd to 16th block (14 blocks) is the bitmap structure itself.

Total of 16 blocks for a 64K size required for a LMT

I dumped the 3rd block and

Start dump data blocks tsn: 3 file#: 4 minblk 3 maxblk 3 buffer tsn: 3 rdba: 0x01000003 (4/3)
scn: 0x0000.000098d7 seq: 0x01 flg: 0x00 tail: 0x98d71e01 frmt: 0x02 chkval: 0x0000 type: 0x1e=KTFB Bitmapped File Space Bitmap

File Space Bitmap Block:
BitMap Control:
RelFno: 4, BeginBlock: 17, Flag: 0, First: 0, Free: 30720

0000000000000000 0000000000000000 0000000000000000 0000000000000000
.....

The number of extents tracked by this block is 30720. I have pasted only the 1st line of the bitmap and each bit tracks 4 extents and there are 64 bits in one line and so 256 extents. There are 120 lines with 64 bits each in this block that does the tracking. Data is stored from block 17 onwards indicated by Beginblock 17

Total extents that can be tracked in this datafile is 430080 (30720*14)

For a 8K block size database,
the 1st 2 blocks are same as above and
3rd - 8th block (6 blocks) has the bitmap structure Total 8 blocks (64K bitmap)

Start dump data blocks tsn: 4 file#: 5 minblk 3 maxblk 3 buffer tsn: 4 rdba: 0x01400003 (5/3)
scn: 0x0000.0000a145 seq: 0x01 flg: 0x00 tail: 0xa1451e01 frmt: 0x02 chkval: 0x0000 type: 0x1e=KTFB Bitmapped File Space Bitmap

File Space Bitmap Block:
BitMap Control:
RelFno: 5, BeginBlock: 9, Flag: 0, First: 0, Free: 63488

0000000000000000 0000000000000000 0000000000000000 0000000000000000

Here the extents are 63488 that are tracked. Data is stored from block 9 onwards indicated by Beginblock 9
Total extents that can be tracked here is 380928 (63488*8)

For a 16K block size,

The 1st two blocks are the same
3rd and 4th blocks (2 blocks)for bitmap structure Total 4 blocks for a 64K bitmap structure

Start dump data blocks tsn: 77 file#: 173 minblk 3 maxblk 3 buffer tsn: 77 rdba: 0x2b400003 (173/3)
scn: 0x03ac.cb84e875 seq: 0x01 flg: 0x00 tail: 0xe8751e01 frmt: 0x02 chkval: 0x0000 type: 0x1e=KTFB Bitmapped File Space Bitmap

File Space Bitmap Block:
BitMap Control:
RelFno: 173, BeginBlock: 5, Flag: 0, First: 0, Free: 129024

0000000000000000 0000000000000000 0000000000000000 0000000000000000

Here the number of extents that are tracked is 129024. Data is stored from block 5 onwards indicated by Beginblock 5.

Total extents that can be tracked for this data file is 258048 (129024*2)

Question 1

The only similarity between the numbers 30720, 63488 and 129024 is if you subtract these numbers from the next higher power of 2 then the difference is 2048 for these numbers.
For eg: 32768 - 30720 = 2048
65536 - 63488 = 2048
131072 - 129024 = 2048

Is there a reason for these number of extents(30720 for 4K, 63488 for 8K and 129024 for 16K) that are being tracked? What is the reasoning behind these numbers that are tracked?

Question 2

Though it is probably not possible practically, if we have a 4K block size and if I create a datafile that is 13.125G and create a table with initial extents of 430080 it should get created OK. What happens if I add space to the datafile and allocate one more extent 430081 and how is that extent tracked?

Thanks for your help in advance.
Sorry once again for the long mail.

Regards,
Madhavan


Received on Tue Dec 19 2000 - 17:44:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US