当前位置:网站首页>你知道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的需求 - 开窗函数的方案》
近期的热文:
文章分类和索引:
边栏推荐
- Qt新项目_MyNotepad++
- ArrayList and LinkedList
- leetcode621. task scheduler
- Pattern matching and regular expressions in PostgreSQL - Das
- Launcher启动过程
- Three talking about exception -- error handling
- Android kotlin broadcast technology point
- P1908 逆序对
- 题解:《压缩技术》(原版、续集版)
- Origin plots thermogravimetric TG and differential thermogravimetric DTG curves
猜你喜欢

Operation tutorial: how does easydss convert MP4 on demand files into RTSP video streams?

Runhe hi3516 development board openharmony small system and standard system burning

浏览器驱动的下载

Partner cloud form strong upgrade! Pro version, more extraordinary!

Can automatically update the universal weekly report template, you can use it with your hand!

uniapp小程序 subPackages分包配置

selenium,元素操作以及浏览器操作方法

Bridge of undirected graph

Chinese name extraction (toy code - accurate head is too small, right to play)

Performance optimization of memory function
随机推荐
Dingtalk send message
Halcon extract orange (Orange)
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
Chaos engineering platform chaosblade box new heavy release
selenium的特点
Story points vs. human days
D language, possible 'string plug-ins'
默认插槽,具名插槽,作用域插槽
【虹科技术分享】如何测试 DNS 服务器:DNS 性能和响应时间测试
你的 Sleep 服务会梦到服务网格外的 bookinfo 吗
Will your sleep service dream of the extra bookinfo on the service network
Use bloc to build a page instance of shutter
Mysql5.7 installation super easy tutorial
故事点 vs. 人天
Engineers who can't read device manuals are not good cooks
How to use SAP's metadata framework (MDF) to build custom business rules?
Verification failed, please check your call back website. You can follow the instructions
QT - make a simple calculator - realize four operations
不会看器件手册的工程师不是个好厨子
Selenium installing selenium in pycharm