当前位置:网站首页>你知道Oracle的数据文件大小有上限么?
你知道Oracle的数据文件大小有上限么?
2022-07-02 10:24:00 【bisal(Chen Liu)】
传统的关系型数据库,虽然客户端同数据库交互的时候,都是在和各种缓存打交道,但是"数据"还是要进行落盘的操作,文件是他的存储形式,既然是文件,就会有容量限制,那么,Oracle的数据文件大小究竟有何限制?
参考一些资料,每个数据文件最多只能包含2^22-1个数据块,这个限制是由于Oracle的Rowid中使用22位来代表Block号,这22位最多只能代表2^22-1个数据块。当然,Oracle10g引入了大文件表空间,Oracle就可以使用32位来代表Block号,因此,大文件表空间下每个文件最多可以容纳4G个Block。
P. S. 《什么是rowid?》
如果是默认的8k数据块,一个数据文件包含了2^22-1个数据块,他的文件大小,就是2^22-1 * 8k / 1024 /1024 = 32G,即最大不能超过32G。相应,
4k数据块的数据文件最大不超过16G。
16k数据块的数据文件最大不超过64G。
32k数据块的数据文件最大不超过128G。
64k数据块的数据文件最大不超过256G。
如果是大文件表空间,采用默认8k数据块,数据文件就可以达到32T,如果是32k的数据块,数据文件大小就可以达到128T。
虽然,按照上述计算,数据文件大小有个上限,但是,若操作系统支持的单个文件最大容量小于此值,则以操作系统的最大容量为限。另外,Windows中只能使用2k、4K、8K、16K的块大小,最大的块容量,就会略小。
和数据文件相关的有个db_files参数,他指定了一个实例可以创建的最大文件数量。这个值可以被修改,但只有重启实例后,才会生效。db_files设置得过低,可能造成不能添加新的数据文件的问题。设置得过高,会消耗更多的内存资源。对于如何设置,《Database Administrator’s Guide》给出了指引,但还是得结合实际情况,
https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/managing-data-files-and-temp-files.html#GUID-BB7D8910-FCAE-4DAD-BDE5-B5EE35C69C6B
因此,包括不仅限于Oracle和数据文件大小的问题,当我们碰到实际需求场景的时候,了解这些限制,有助于我们选择最合适的方案。
参考资料,
http://www.eygle.com/archives/2007/07/oracle_datafile_limit.html
https://www.modb.pro/db/386663?utm_source=index_ai
近期更新的文章:
《小白学习MySQL - 增量统计SQL的需求 - 开窗函数的方案》
近期的热文:
文章分类和索引:
边栏推荐
- 科技的成就(二十七)
- The second anniversary of the three winged bird: the wings are getting richer and the take-off is just around the corner
- How much do you know about free SSL certificates? The difference between free SSL certificate and charged SSL certificate
- Clean up system cache and free memory under Linux
- Astro learning notes
- MAC (MacOS Monterey 12.2 M1) personal use PHP development
- The xftp connection Haikang camera reported an error: the SFTP subsystem application has been rejected. Please ensure that the SFTP subsystem settings of the SSH connection are valid
- Qt入门-制作一个简易的计算器
- P1908 逆序对
- Everyone believes that the one-stop credit platform makes the credit scenario "useful"
猜你喜欢
【文档树、设置】字体变小
How to explain binary search to my sister? This is really difficult, fan!
Unity small map production [2]
[cloud native database] what to do when encountering slow SQL (Part 1)?
OpenFOAM:lduMatrix&lduAddressing
Runhe hi3516 development board openharmony small system and standard system burning
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 05 | 深入浅出索引(下)
Performance optimization of memory function
Explanation: here is your UFO, Goldbach conjecture
Why is the default of switch followed by break?
随机推荐
JS reverse massive creative signature
大家信夫一站式信用平台让信用场景“用起来
Solution: Compression Technology (original version and sequel version)
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 05 | 深入浅出索引(下)
Pocket Raider comments
Verification failed, please check your call back website. You can follow the instructions
石子合并板子【区间DP】(普通石子合并 & 环形石子合并)
selenium,元素操作以及浏览器操作方法
使用BLoC 构建 Flutter的页面实例
Use bloc to build a page instance of shutter
Android kotlin material design technology points
Slashgear shares 2021 life changing technology products, which are somewhat unexpected
P1042 [NOIP2003 普及组] 乒乓球
I did it with two lines of code. As a result, my sister had a more ingenious way
Unity skframework framework (XII), score scoring module
为什么switch 的default后面要跟break?
The xftp connection Haikang camera reported an error: the SFTP subsystem application has been rejected. Please ensure that the SFTP subsystem settings of the SSH connection are valid
P1347 排序(拓扑 + spfa判断环 or 拓扑[内判断环])
Runhe hi3516 development board openharmony small system and standard system burning
Research shows that "congenial" is more likely to become friends