"The maximum data file size supported by the tablespace algorithm" "Database Limit" "Data File File header reserved data block Count"

Source: Internet
Author: User
Tags base64 reserved types of tables


when you set a different size db_block_size in the local management table space, the data file header reserves the appropriate space for the following:--?? db_block_size=2kb, the file header retains 32 pieces of data, i.e. 64KB.
db_block_size=4kb. The file header retains 16 data blocks, or 64KB.
db_block_size=8kb, the file header retains 8 pieces of data, i.e. 64KB.


DB_BLOCK_SIZE=16KB, the file header retains 4 blocks of data. i.e. 64KB.
DB_BLOCK_SIZE=32KB, the file header retains 4 blocks of data. i.e. 128KB.

--Why not 64KB?
The default is db_block_size=8kb, at which point the 8 data blocks of the Oracle data file header are:

Data Block 1 and 2 record data file header information. 3-8 Bitmap information for recording the extent-interval

extent management Local uniform size 256k-- assign each extent minimum including 256k a minimum of 8 block,size.

Allocate each extent minimum including x blocks?

If db_block_size=16kb, the file header retains 4 data blocks, which is 64KB.

4m<=x*64k*8

X>=8

--Each data file has a maximum of 4M blocks, preserving each bit in the data block represents the usage state of x blocks, preserving the state of the blocks that need to store 4M chunks.



The maximum data file size supported by the tablespace algorithm:

In two cases: Smallfile tablespace and Bigfile tablespace
Smallfile Tablespace's rowIDrecords the database object to which the store belongs. the data file (file#), the line number in the data block in which the attributes are merged to form the Oracle ROWID.
ORACLE rowID is divided into physical rowid, logic rowid.--?

?
The Index organization table (IOTS) uses logical rowID, and other types of tables use physical ROWID.
rowID can uniquely identify a record, so the value of ROWID is stored in the index. By visiting the index. Get rowID, and then locate the record.

The ROWID is BASE64 encoded with a total of 18 bits representing 80 binary digits. Occupies 10 bytes.

--1Byte=8bit
Each set of characters represents a different meaning, with a 18-bit maximum addressing space of "32G". --??
parsing of a row ID: OOOOOO.FFF.BBBBBB.RRR--ROWID structure 6-3-6-3
oooooo:1-6 bit: Object ID--usually refers to segment number
fff:7-9 bit: File ID
bbbbbb:10-15 bit: Block ID
rrr:16-18 bit: Row ID
for BASE64 encoding, a total of 18 bits represents a 80-bit binary number, calculated by:
32bit obj# + 10bit file# + 22bit block# + 16bit row#

Calculate data block correlation by ROWID

http://blog.csdn.net/hughwang1216/article/details/12927701

http://blog.csdn.net/hughwang1216/article/details/11871305


Maximum number Algorithm Note Experimental test
Maximum number of files per table space 2^10[1K] Remove all 0 1023
Maximum number of data blocks per data file 2^22-1[4M] Remove all 0 4194304
Number of rows per BLOKC 2^16[64k] Remove all 0
Maximum number of database objects 2^32[4G] Remove all 0



Error: A maximum of 64K data files per database. Supports up to 64K table spaces. Because each tablespace needs to include at least one data file.

Correction: up to 64K data files per database. The small tablespace supports up to 64 table spaces. Large table spaces support up to 65k of table space. Because there is only one data file for each table space in a large table space. Oracle to ensure that every space in the small table space can hold 1023 data files, so the number of table space is limited, that is, 64k/1023 is approximately equal to 64 table space.

--The Official document is 65533--how to calculate it ??


Raises a new question: Assuming that the database has more than 1024 data files, how does Oracle locate data files through rowID?

After more than 1023 data files, Oracle guarantees that FILE_ID is unique throughout the database, and that RELATIVE_FNO is unique within a single tablespace.

Then there is a problem with the same relative file number data file in different table spaces how does Oracle differentiate it?

32bit obj# + 10bit file# + 22bit block# + 16bit row# According to the following understanding

data_object_id,rfn,block#,row#.

A data file can only belong to a table space, and with the combination of data_object_id and the data dictionary view, Oracle is able to know which table space to point to. The RFN is then converted to file_id, which enables accurate row positioning.

DATA_OBJECT_ID (usually segment number), which table space,relative_fno->file_id



More specific database restrictions see the Official document: http://docs.oracle.com/cd/B19306_01/server.102/b14237/limits.htm#REFRN004--??


rowID of bigfile table spacebecause the large file tablespace can only include one file, there is no need to file#-the file ID in rowID.
the ROWID format for large file table spaces is:
oooooo. Lllllllll.rrr
oooooo:1-6 bit: Object ID
lllllllll:7-15 bit: Block ID
rrr:16-18 bit: Row ID

L represents the block number, replacing the position of file# + block# in rowID in the small file table space.

For BASE64 encoding, a total of 18 bits represents a 80-bit binary number. The calculation method is:

32bit obj# + 32bitfile&block# + 16bit row#

The data files for this large file table space are supported by the The maximum number of blocks is: 2^32=4g.



smallfile tablespace The maximum size the data file agrees to when setting a different size db_block_sizedb_block_size=2kb,2kb*4m=8192m 8G
db_block_size=4kb,4kb*4m=16384m 16G
db_block_size=8kb,8kb*4m=32768m 32G 8*1024*4m=8*4g=32g
db_block_size=16kb. 16kb*4m=65536m 64G
db_block_size=32kb,32kb*4m=131072m 128G


bigfile tablespace The maximum size the data file agrees to when setting a different size db_block_sizedb_block_size=2kb,2kb*4g= 8T
DB_BLOCK_SIZE=4KB. 4kb*4g= 16T
db_block_size=8kb,8kb*4g= 32T 8*1024*4G=8*4TB=32TB
db_block_size=16kb,16kb*4g= 64T
Db_block_size=32kb,32kb*4g=128tb


"The maximum data file size supported by the tablespace algorithm" "Database Limit" "Data File File header reserved data block Count"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.