Introduction to Oracle bigfile tablespace and analysis of its advantages and disadvantages

Reprinted from: https://www.6ccn.com/article/10451.shtml

Introduction to Oracle bigfile tablespace and analysis of its advantages and disadvantages

A database is composed of one or more logical storage units called tablespaces. The logical storage unit in a tablespace is a segment, and a segment can be further divided into data extents. The data extension is composed of a group of consecutive data blocks (datablock).

large file tablespace

In Oracle users can create large file tablespaces (bigfile tablespace). In this way, the tablespace used by the Oracle database can be composed of a single large file instead of several small data files. This enables Oracle to use the capabilities of a 64-bit system to create and manage very large files. In a 64-bit system, the storage capacity of the Oracle database is extended to 8 EB (1EB = 1024PB, 1PB = 1024TB, 1TB = 1024GB).

When the database files are managed by Oracle (Oracle-managed files), and the big file tablespace (bigfile tablespace) is used, the data files are completely transparent to the user. In other words, users only need to perform management operations on the tablespace (tablespace), and do not need to care about the underlying data files (datafile). Use largefile tablespaces to make tablespaces the primary target for diskspace management, backup, and restore operations. Using large file tablespaces, combined with Oracle-managed files technology and Automatic Storage Management technology, eliminates the need for administrators to manually create new datafiles and maintain Numerous database files, thus simplifying database file management.

By default, the database creates a smallfile tablespace, which is the traditional tablespace type in Oracle. The SYSTEM and SYSAUX tablespaces in the database are always created using the traditional type, only locally managed (locally managed); and tablespaces with automatic segmentspace management (tablespaces) can use bigfile tablespaces (bigfile tablespaces) . But there are two exceptions: locally managed undo tablespaces and temporary tablespaces , which can use largefile tablespaces even if their segments are manually managed. An Oracle database can contain both bigfile/smallfile tablespaces. SQL statements are executed without regard to the type of tablespace unless the datafile name is explicitly referenced in the statement.

Administrators can create a group of temporary tablespaces (temporary tablespaces), users can use the temporary space provided by each tablespace (tablespace) in the group when needed. Administrators can also specify a tablespace group as the default temporary tablespace for the database. When users need a lot of temporary space for sorting operations, they can use large file tablespaces and tablespace groups.

Advantages of using largefile tablespaces

使用大文件表空间(bigfile tablespace)可以显著地增强Oracle数据库的存储能力。一个小文件 表空间(smallfile tablespace)最多可以包含1024个数据文件(datafile),而一个大文件表空间 中只包含一个文件,这个数据文件的最大容量是小数据文件的1024倍。这样看来,大文件表空间和小 文件表空间的最大容量是相同的。但是由于每个数据库最多使用64K个数据文件,因此使用大文件表空 间时数据库中表空间的极限个数是使用小文件表空间时的1024倍,使用大文件表空间时的总数据库容 量比使用小文件表空间时高出三个数量级。换言之,当一个Oracle数据库使用大文件表空间,且使用 最大的数据块容量时(32K),其总容量可以达到8EB。

在超大型数据库中使用大文件表空间减少了数据文件的数量,因此也简化了对数据文件的管理工作 。由于数据文件的减少,SGA中关于数据文件的信息,以及控制文件(control file)的容量也得以减 小。

由于数据文件对用户透明,由此简化了数据库管理工作。

使用大文件表空间时需要考虑的因素

大文件表空间(bigfile tablespace)应该和自动存储管理(Automatic Storage Management)或 其他逻辑卷管理工具(logical volume manager)配合使用,这些工具应该能够支持动态扩展逻辑卷 ,也能支持striping(数据跨磁盘分布)或RAID。

应该避免在不支持striping的系统上使用大文件表空间,因为这将不利于并行执行(parallel execution)及 RMAN 的并行备份(backup parallelization)。

当表空间正在使用的磁盘组(disk group)可能没有足够的空间,且扩展表空间的唯一办法是向另 一个磁盘组加入数据文件时(大文件表空间只能有一个数据文件),应避免使用大文件表空间。

不建议在不支持大文件的平台上使用大文件表空间,这会限制表空间(tablespace)的容量。参考 相关的操作系统文档了解其支持的最大文件容量。

如果使用大文件表空间替代传统的表空间,数据库开启(open),checkpoints,以及 DBWR 进程 的性能会得到提高。但是增大数据文件

(datafile)容量可能会增加备份与恢复的时间。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325152519&siteId=291194637