Table of Contents
smallfile tablespace的ROWID
BIGFILE表空间的ROWID
smallfile tablespace设置不同大小的db_block_size时数据文件允许的最大大小
bigfile tablespace设置不同大小的db_block_size时数据文件允许的最大大小
Home Database Mysql Tutorial 【表空间支持的最大数据文件大小的算法】【数据库限制】【数据文

【表空间支持的最大数据文件大小的算法】【数据库限制】【数据文

Jun 07, 2016 pm 03:56 PM
support data database document maximum local space algorithm limit

本地管理表空间中设置不同大小的db_block_size时数据文件头保留空间对应如下:--?? db_block_size=2KB,文件头保留32个数据块,即64KB。 db_block_size=4KB,文件头保留16个数据块,即64KB。 db_block_size=8KB,文件头保留8个数据块,即64KB。 db_block_s

本地管理表空间中设置不同大小的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个块???

extent management local uniform size 256K--分配每个extent最小包含256k个block,size最小为8.

分配每个extent最小包含X个block? 假设db_block_size=16KB,文件头保留4个数据块,即64KB。

4M

X>=8

--每个数据文件最大有4M个块,保留数据块中每个bit表示X个block的使用状态,保留数据块需要存储4M个块的状态。

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

分两种情况: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个字节。--1Byte=8bit
每组字符代表不同的含义,18位最大寻址空间“32G”。。--??
对一条行ID的解析:OOOOOO.FFF.BBBBBB.RRR --rowid结构6-3-6-3
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 
最大数 算法 备注 实验测试
每个表空间最大文件数 2^10[1K] 去掉全0 1023
每数据文件最大数据块数量 2^22-1[4M] 去掉全0 4194304
每个BLOKC中行数 2^16[64k] 去掉全0  
数据库对象最大数 2^32[4G] 去掉全0  

每个数据库最多64K个数据文件,最多支持64K个表空间,因为每个表空间最少需要包含一个数据文件。--怎么算出来的??

--官方文档上是65533

引出新问题:如果数据库有大于1024个数据文件,ORACLE如何通过ROWID定位数据文件呢? --详见:数据文件个数大于1024时ORACLE数据文件FILE_ID及RELATIVE_FNO的变化示例

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

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#的位置.

对于Base64编码,共18位代表80位二进制数,计算方法是:

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

这样大文件表空间的数据文件支持的BLOCK数量最多是:2^32=4G.

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 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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
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)

Implementing Machine Learning Algorithms in C++: Common Challenges and Solutions Implementing Machine Learning Algorithms in C++: Common Challenges and Solutions Jun 03, 2024 pm 01:25 PM

Common challenges faced by machine learning algorithms in C++ include memory management, multi-threading, performance optimization, and maintainability. Solutions include using smart pointers, modern threading libraries, SIMD instructions and third-party libraries, as well as following coding style guidelines and using automation tools. Practical cases show how to use the Eigen library to implement linear regression algorithms, effectively manage memory and use high-performance matrix operations.

Improved detection algorithm: for target detection in high-resolution optical remote sensing images Improved detection algorithm: for target detection in high-resolution optical remote sensing images Jun 06, 2024 pm 12:33 PM

01 Outlook Summary Currently, it is difficult to achieve an appropriate balance between detection efficiency and detection results. We have developed an enhanced YOLOv5 algorithm for target detection in high-resolution optical remote sensing images, using multi-layer feature pyramids, multi-detection head strategies and hybrid attention modules to improve the effect of the target detection network in optical remote sensing images. According to the SIMD data set, the mAP of the new algorithm is 2.2% better than YOLOv5 and 8.48% better than YOLOX, achieving a better balance between detection results and speed. 02 Background & Motivation With the rapid development of remote sensing technology, high-resolution optical remote sensing images have been used to describe many objects on the earth’s surface, including aircraft, cars, buildings, etc. Object detection in the interpretation of remote sensing images

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

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

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())

Application of algorithms in the construction of 58 portrait platform Application of algorithms in the construction of 58 portrait platform May 09, 2024 am 09:01 AM

1. Background of the Construction of 58 Portraits Platform First of all, I would like to share with you the background of the construction of the 58 Portrait Platform. 1. The traditional thinking of the traditional profiling platform is no longer enough. Building a user profiling platform relies on data warehouse modeling capabilities to integrate data from multiple business lines to build accurate user portraits; it also requires data mining to understand user behavior, interests and needs, and provide algorithms. side capabilities; finally, it also needs to have data platform capabilities to efficiently store, query and share user profile data and provide profile services. The main difference between a self-built business profiling platform and a middle-office profiling platform is that the self-built profiling platform serves a single business line and can be customized on demand; the mid-office platform serves multiple business lines, has complex modeling, and provides more general capabilities. 2.58 User portraits of the background of Zhongtai portrait construction

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

Groundbreaking CVM algorithm solves more than 40 years of counting problems! Computer scientist flips coin to figure out unique word for 'Hamlet' Groundbreaking CVM algorithm solves more than 40 years of counting problems! Computer scientist flips coin to figure out unique word for 'Hamlet' Jun 07, 2024 pm 03:44 PM

Counting sounds simple, but in practice it is very difficult. Imagine you are transported to a pristine rainforest to conduct a wildlife census. Whenever you see an animal, take a photo. Digital cameras only record the total number of animals tracked, but you are interested in the number of unique animals, but there is no statistics. So what's the best way to access this unique animal population? At this point, you must be saying, start counting now and finally compare each new species from the photo to the list. However, this common counting method is sometimes not suitable for information amounts up to billions of entries. Computer scientists from the Indian Statistical Institute, UNL, and the National University of Singapore have proposed a new algorithm - CVM. It can approximate the calculation of different items in a long list.

See all articles