TEMPORARY Tablespaces and TEMPFILES
来源:互联网 发布:解压缩软件美化版 编辑:程序博客网 时间:2024/04/27 19:10
1、 临时表空间
临时表空间主要用于存储临时表和SQL语句在执行排序操作的时候使用,它主要存储会话过程中的临时信息,如排序信息等
主要有以下使用场景:
两个大表进行关联后,执行排序(当用于排序的内存不足时,会使用临时表空间,排序内存由初始化参数:SORT_AREA_SIZE 决定),以下是查看该参数的方法:
2、执行analyze语句,进行表统计信息的收集
3、create index
4、select distinct
5、group by ,union ,minus,intersect,sort merge join等
6、存储Oracle的临时表及临时表的索引
2、临时表空间的创建
数据库在建立的过程中,会自动创建名为:temp的临时表空间,每个数据库,只能分配一个临时表空间,并且只能有一个默认的临时表空间,可以执行以下的语句创建数据库表空间:
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tablespace_name;
在建立用户的过程中,不需要显式的指定该用户的临时表空间,它将默认取数据库的默认表空间,该参数通过如下视图查询:
SELECT * FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME = 'DEFAULT_TEMP_TABLESPACE'
其中:database_properties代表数据库的永久的属性
当前在该视图中也可以找到数据库默认的持久化表空间
针对临时表空间的性能方面的建议:
1. 用临时表空间代替永久表空间进行排序操作
2. 确保使用本地表空间管理临时表空间,而不是使用数据字典管理临时表空间(Use sort space bitmap instead of sys.fet
3. 使用tempfile代替datafile(可以减少备份和恢复的时间)
4. 将临时表空间分散在多个磁盘,减少表空间的争用,提升排序操作的性能
3、临时表空间的离线
临时表空间不允许离线,但是临时表空间对应的临时文件可以离线(当包含多个临时文件,必须有一个文件是在线的,否则提示错误信息)
http://www.laoxiong.net/
http://www.dba-oracle.com/t_ora_25153_temporary_tablespace_is_empty.htm
http://www.dba-oracle.com/t_ora_25152_tempfile_cannot_be_dropped.htm
- TEMPORARY Tablespaces and TEMPFILES
- TEMPORARY Tablespaces and TEMPFILES
- Temporary tablespaces
- Temporary Tablespaces
- Create and manage temporary, permanent, and undo tablespaces
- 转 -- Temporary tablespaces in RAC
- TempFiles
- Default Temporary Tablespace Using Multiple Tablespaces【每日一译】--20121101
- Master Note: Overview of Oracle Temporary Tablespaces (Doc ID 1498442.1)
- Master Note: Troubleshooting Oracle Temporary Tablespaces (Doc ID 1524594.1)
- delete client and reorg tablespaces
- Tablespaces, Datafiles, and Control Files
- Data Guard Physical Standby - Managing temporary tablespace tempfiles (文档 ID 1514588.1)
- tablespaces
- Tablespaces
- oracle create tablespaces and create user ---cxl
- Temporary Tables and Table Variable
- Fundamental I 08 Maintaining Tablespaces and Data Files
- linux文件IO操作
- Compass学习指南
- ros::spin() 和 ros::spinOnce() 区别及详解
- 数据实验九 检索
- activity横竖屏切换梳理
- TEMPORARY Tablespaces and TEMPFILES
- C++协程库coroutine使用指南
- Android设计模式 观察者模式之eventbus
- mysql 查询练习
- android 系统源码简单的编译过程
- 各种编程语言的代码覆盖率工具汇总
- AndroidStudio常用快捷键
- The value of ESP was not properly saved across a function call.
- JavaFX入门教程1——hello world