Table of Contents
本地管理表空间中设置不同大小的db_block_size时数据文件头保留空间对应如下:
smallfile tablespace的ROWID
smallfile tablespace设置不同大小的db_block_size时数据文件允许的最大大小
BIGFILE表空间的ROWID
bigfile tablespace设置不同大小的db_block_size时数据文件允许的最大大小
Home Database Mysql Tutorial 数据文件头块保留大小、ROWID、数据文件最大大小等数据库限制的

数据文件头块保留大小、ROWID、数据文件最大大小等数据库限制的

Jun 07, 2016 pm 03:47 PM
rowid reserve size data database document maximum limit

学习自EYGLE循序渐进ORACLE及官方文档。 本地管理表空间中设置不同大小的db_block_size时数据文件头保留空间对应如下: db_block_size=2KB,文件头保留32个数据块,即64KB。 db_block_size=4KB,文件头保留16个数据块,即64KB。 db_block_size=8KB,文件头保

学习自EYGLE循序渐进ORACLE及官方文档。

本地管理表空间中设置不同大小的db_block_size时数据文件头保留空间对应如下:

db_block_size=2KB,文件头保留32个数据块,即64KB。
db_block_size=4KB,文件头保留16个数据块,即64KB。
db_block_size=8KB,文件头保留8个数据块,即64KB。
db_block_size=16KB,文件头保留4个数据块,即64KB。
db_block_size=32KB,文件头保留4个数据块,即128KB。
默认是db_block_size=8KB,此时 ORACLE数据文件头的8个数据块作用是:
数据块1和2记录数据文件头信息。3-8用于记录extent-区间的位图信息  --11G中要保留到128个块???
################################

Oracle数据库中的数据文件的最大数量是有限的(通常64K文件。--来自官方文档

表空间支持的最大数据文件大小的算法:

分两种情况:smallfile tablespace与bigfile tablespace

smallfile tablespace的ROWID

记录存储所在数据文件(file#),所属数据库对象,所在数据块中的行号,这些属性合并起来构成了ORACLE ROWID.
ORACLE ROWID分为物理ROWID,逻辑ROWID。
索引组织表(IOTs)使用逻辑ROWID,其它类型的表使用物理ROWID。
ROWID可以惟一标识一条记录,所以索引中存储了ROWID的值,通过访问索引,得到ROWID,再定位到记录。

ROWID采用Base64编码,共18位代表80位二进制数,占用10个字节。
每组字符代表不同的含义,18位最大寻址空间“32G”。。
对一条行ID的解析:OOOOOO.FFF.BBBBBB.RRR   --其中.是为了方便观看手动增加
OOOOOO: 1-6位:对象id
FFF:    7-9位:文件id
BBBBBB: 10-15位:块id
RRR:    16-18位:行id
对于Base64编码,共18位代表80位二进制数,计算方法是:
32bit obj# + 10bit file#  + 22bit block#  +  16bit row#
通过ROWID计算数据块的相关信息,详见:http://blog.csdn.net/q947817003/article/details/11490051
根据small file tablespace的ROWID,计算出表空间、数据文件、BOOCK中行最大数如下:
根据ROWID的构成:          ---注:2^10这种写法代表2的10次方,等于1024.
每个表空间最大文件数:      2^10 1024 ,去掉全0和全1 通常1022个  ---实验测试出是1023个,见:数据文件个数大于1024时ORACLE数据文件FILE_ID及RELATIVE_FNO的变化示例
每数据文件最大数据块数量:filesize=block_size*2^22   ,也就是4M个ORACLE BLOCK

每个BLOKC中行数是:       2^16   65536,也就是每个BLOCK最多65536条记录

每个数据库最多65536个-64K个数据文件(实验测试出是65534----官方文档上是65533-http://docs.oracle.com/cd/B19306_01/server.102/b14237/limits002.htm#i287915,最多支持64K个表空间,因为每个表空间最少需要包含一个数据文件。引出新问题:如果数据库有大于1024个数据文件,ORACLE如何通过ROWID定位数据文件呢? --详见:数据文件个数大于1024时ORACLE数据文件FILE_ID及RELATIVE_FNO的变化示例

更详细的数据库限制见官方文档:http://docs.oracle.com/cd/B19306_01/server.102/b14237/limits.htm#REFRN004

smallfile tablespace设置不同大小的db_block_size时数据文件允许的最大大小

db_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表空间的ROWID

因为大文件表空间只能包含一个文件,所以ROWID中不需要file#-文件ID。
大文件表空间的ROWID格式为:
OOOOOO.LLLLLLLLL.RRR
OOOOOO: 1-6位:对象id
LLLLLLLLL: 7-15位:块id
RRR:    16-18位:行id
L代表BLOCK号,代替了小文件表空间中ROWID中的file#  +  block#的位置.
这样大文件表空间的数据文件支持的BLOCK数量最多是:2bit. 2^32=4G.

bigfile tablespace设置不同大小的db_block_size时数据文件允许的最大大小

db_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
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1671
14
PHP Tutorial
1276
29
C# Tutorial
1256
24
iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

AI startups collectively switched jobs to OpenAI, and the security team regrouped after Ilya left! AI startups collectively switched jobs to OpenAI, and the security team regrouped after Ilya left! Jun 08, 2024 pm 01:00 PM

Last week, amid the internal wave of resignations and external criticism, OpenAI was plagued by internal and external troubles: - The infringement of the widow sister sparked global heated discussions - Employees signing "overlord clauses" were exposed one after another - Netizens listed Ultraman's "seven deadly sins" Rumors refuting: According to leaked information and documents obtained by Vox, OpenAI’s senior leadership, including Altman, was well aware of these equity recovery provisions and signed off on them. In addition, there is a serious and urgent issue facing OpenAI - AI safety. The recent departures of five security-related employees, including two of its most prominent employees, and the dissolution of the "Super Alignment" team have once again put OpenAI's security issues in the spotlight. Fortune magazine reported that OpenA

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI 70B model generates 1,000 tokens in seconds, code rewriting surpasses GPT-4o, from the Cursor team, a code artifact invested by OpenAI Jun 13, 2024 pm 03:47 PM

70B model, 1000 tokens can be generated in seconds, which translates into nearly 4000 characters! The researchers fine-tuned Llama3 and introduced an acceleration algorithm. Compared with the native version, the speed is 13 times faster! Not only is it fast, its performance on code rewriting tasks even surpasses GPT-4o. This achievement comes from anysphere, the team behind the popular AI programming artifact Cursor, and OpenAI also participated in the investment. You must know that on Groq, a well-known fast inference acceleration framework, the inference speed of 70BLlama3 is only more than 300 tokens per second. With the speed of Cursor, it can be said that it achieves near-instant complete code file editing. Some people call it a good guy, if you put Curs

China Mobile: Humanity is entering the fourth industrial revolution and officially announced 'three plans” China Mobile: Humanity is entering the fourth industrial revolution and officially announced 'three plans” Jun 27, 2024 am 10:29 AM

According to news on June 26, at the opening ceremony of the 2024 World Mobile Communications Conference Shanghai (MWC Shanghai), China Mobile Chairman Yang Jie delivered a speech. He said that currently, human society is entering the fourth industrial revolution, which is dominated by information and deeply integrated with information and energy, that is, the "digital intelligence revolution", and the formation of new productive forces is accelerating. Yang Jie believes that from the "mechanization revolution" driven by steam engines, to the "electrification revolution" driven by electricity, internal combustion engines, etc., to the "information revolution" driven by computers and the Internet, each round of industrial revolution is based on "information and "Energy" is the main line, bringing productivity development

How to save JSON data to database in Golang? How to save JSON data to database in Golang? Jun 06, 2024 am 11:24 AM

JSON data can be saved into a MySQL database by using the gjson library or the json.Unmarshal function. The gjson library provides convenience methods to parse JSON fields, and the json.Unmarshal function requires a target type pointer to unmarshal JSON data. Both methods require preparing SQL statements and performing insert operations to persist the data into the database.

How to use database callback functions in Golang? How to use database callback functions in Golang? Jun 03, 2024 pm 02:20 PM

Using the database callback function in Golang can achieve: executing custom code after the specified database operation is completed. Add custom behavior through separate functions without writing additional code. Callback functions are available for insert, update, delete, and query operations. You must use the sql.Exec, sql.QueryRow, or sql.Query function to use the callback function.

See all articles