"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 types of tables


when you set different size db_block_size in the local management table space, the data file header reserve space corresponds to 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 pieces of data, i.e. 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 pieces of data, i.e. 64KB.
db_block_size=32kb, the file header retains 4 pieces of data, i.e. 128KB.
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 extent-interval --11g to 128 blocks???

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

Allocate each extent with a minimum of X block? Assuming db_block_size=16kb, the file header retains 4 data blocks, or 64KB.

4m<=x*64k*8

X>=8

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



The maximum data file size supported by the tablespace algorithm:

In two cases: Smallfile tablespace and Bigfile tablespace
Smallfile Tablespace's rowIDThe record stores the database object, the data file (file#), and the line number in the data block, which is combined 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 index stores the value of ROWID, accesses the index, gets rowid, and navigates to the record.

the ROWID is BASE64 encoded, with a total of 18 bits representing a 80-bit binary number, which 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#
for information on calculating blocks of data by ROWID, see: http://blog.csdn.net/q947817003/article/details/11490051

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



Up to 64K data files per database, up to 64K table spaces, because each tablespace needs to contain at least one data file. --How is it calculated ??

--The Official document is 65533.


Raises a new question: How can Oracle locate data files with rowID if the database has more than 1024 data files? --See: Examples of Changes to Oracle data files file_id and RELATIVE_FNO when the number of data files is greater than 1024


For more detailed database limitations See official documents: http://docs.oracle.com/cd/B19306_01/server.102/b14237/limits.htm#REFRN004--??


rowID of bigfile table spacebecause a large file tablespace can contain only one file, the file#-file ID is not required 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 instead of the file# + block# position in rowID in the small file table space.

For BASE64 encoding, a total of 18 bits represents a 80-bit binary number, calculated by:

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 allowed for a data file 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 allowed for a data file 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


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.