- 浏览: 27131 次
- 性别:
- 来自: 北京
最新评论
1.SEGMENT:
allocated for a specific data structure
Oracle allocates space for segments in units of one extent.
A segment and all its extents are stored in one tablespace
segment can span datafiles
table,index,temporary,undo
2.EXTENTS:
An extent is a specific number of contiguous data blocks.
Oracle allocates space for segments in units of one extent.
each extent can contain data from only one datafile.
alter table t allocate extent(size 1m datafile '');
alter table t deallocate unused;
3.BLOCK:
Although you can allocate additional extents, the blocks themselves are allocated separately. If you allocate an extent to a specific instance, the blocks are immediately allocated to the free list. However, if the extent is not allocated to a specific instance, then the blocks themselves are allocated only when the high water mark moves. The high water mark is the boundary between used and unused space in a segment.
A data block is the smallest unit of data used by a database
Data Block Format:Header,Table Directory,Row Directory,Free Space,Row Data
Row Chaining and Migrating
In two circumstances, the data for a row in a table may be too large to fit into a single data block. In the first case, the row is too large to fit into one data block when it is first inserted. In this case, Oracle stores the data for the row in a chain of data blocks (one or more) reserved for that segment. Row chaining most often occurs with large rows, such as rows that contain a column of datatype LONG
or LONG
RAW
. Row chaining in these cases is unavoidable.
However, in the second case, a row that originally fit into one data block is updated so that the overall row length increases, and the block's free space is already completely filled. In this case, Oracle migrates the data for the entire row to a new data block, assuming the entire row can fit in a new block. Oracle preserves the original row piece of a migrated row to point to the new block containing the migrated row. The rowid of a migrated row does not change.
When a row is chained or migrated, I/O performance associated with this row decreases because Oracle must scan more than one data block to retrieve the information for the row.
PCTFREE,PCTUSE,initrans,maxtrans,freelists
4. STRUCTURE OF THE ROW
generally, a row of table sore in a block. null columns can not sore in block.
head: the numbers of columns in a row. chain information. lock status.
row data: column length. column value. the slot of the Row Directory in the block point to the begining of the row.
发表评论
-
from string get number data using pl/sql or sql
2012-02-16 17:32 888declare @aa varchar(80),--- ... -
SQL
2012-02-15 18:01 7241.select sal salary from emp; ... -
modify ip
2012-02-10 17:45 7891.netconfig 2./etc/sysconfig/n ... -
MULTI dbwr or io slaves
2012-02-10 15:21 878thanks dukope of itpub. ... -
FAQS
2012-02-09 15:59 7531.How can I get the largest amo ... -
HOW TO STUDY ORACLE FROM Yong Huang
2012-01-18 14:48 798Assuming you want to study orac ... -
RMAN
2012-01-14 17:07 7031.components of the rman ... -
INSTANCE and CRASH RECOVERY
2012-01-12 10:12 7481.type of checkpoint full c ... -
STARTUP PFILE=
2011-12-31 14:11 11951.vi initdbs.ora spfile=&quo ... -
MANAGE TABLE
2011-12-26 16:50 5671.heap table IOT PARTI ... -
MONITOR redo size
2011-12-21 17:48 6421.set autot on stat 2.unsin ... -
What do rollback and commit
2011-12-21 11:21 735When we COMMIT, all that is lef ... -
What is the schema ?
2011-12-20 15:18 587A schema is a collection of dat ... -
MANAGE UNDOTABS
2011-12-19 17:15 6761.manual undo_management=ma ... -
DBA SQL
2011-12-19 15:21 4351.select a.name,b.status from v ... -
MANAGE TABLESPACE AND DATAFILES
2011-12-13 15:28 5741. tablespace,segment,extent,bl ... -
ORACLE NET
2011-12-12 09:49 6841.net_service_name: servive ... -
SQLPLUS TIPS
2011-12-09 17:51 9031.SQLPLUS : a tool that execute ... -
ORACLE ENVIRONMENT VARIABLES
2011-12-09 17:15 652ORACLE_HOME ORACLE_SID : or ... -
Exam Test1
2011-12-09 16:18 6341.utl_file_dir: indicate the di ...
相关推荐
在ORACLE中,我们可以通过file_id(file#)与block_id(block#)去定位一个数据库对象(object)。例如,我们在10046生成的trace文件中file#=4 block#=266 blocks=8,那么我可以通过下面两个SQL去定位对象 SQL 1:此...
### Oracle 学习笔记知识点详解 #### 一、Block(块) ...综上所述,Oracle数据库中的Block、Extent和Segment构成了其存储架构的基础,通过合理的管理和配置这些组件,可以有效提高数据的存储效率和访问性能。
select tablespace_name,min_extents,max_extents,pct_increase,status from dba_tablespaces; select tablespace_name,initial_extent,next_extent,contents,logging,extent_management,allocation_type from ...
为了解决这些问题,从Oracle 9.2.0版本开始,引入了自动段空间管理(Automatic Segment Space Management, ASSM),利用位图(Bitmap)技术替代原有的链表结构,从而在根本上提升了段存储空间的管理效率。...
一个数据库对象拥有的所有 extents 被称为该对象的 segment。 5. 检查表构造的措施 可以使用 DESCRIBE 命令或 DBMS_METADATA.GET_DDL 包来检查表构造。 6. 查看数据库引擎的报错 可以查看 alert log 来查看...
一个数据库对象拥有的所有 extents 被称为该对象的 segment。 5. 检查表结构的方法 使用 DESCRIBE 命令或 DBMS_METADATA.GET_DDL 包。 6. 查看数据库引擎的报错 使用 alert log。 7. truncate 和 delete 命令的...
1. **确定最大block_id**:通过查询`dba_extents`视图找到当前表空间中最大的block_id,计算出该block_id对应的大小。 2. **移动表、索引等对象**:将block_id大于目标表空间大小的表、索引、分区表等对象移动到一个...
table、segment、extent和block之间的关系是:table 创建时,默认创建了一个data segment,每个datasegment含有min extents指定的extents数,每个extent据据表空间的存储参数分配一定数量的blocks。 tablespace和...
segment 是数据库对象拥有的所有 extents 的集合。 5. 检查表结构的方法: 可以使用 DESCRIBE 命令或 DBMS_METADATA.GET_DDL 包来检查表结构。 6. 查看数据库引擎报错的方法: 可以查看 alert log 来查看数据库...
一个数据库对象拥有的所有extents被称为该对象的segment。 5. 检查表结构的方法 有两种方法可以检查表结构: * 使用DESCRIBE命令 * 使用DBMSMETADATA.GETDDL包 6. 查看数据库引擎的报错 可以使用Oracle提供的...
一个数据库对象拥有的所有 extents 被称为该对象的 segment. 5. 给出两个检查表结构的方法 可以使用 DESCRIBE 命令或 DBMS_METADATA.GET_DDL 包。 6. 怎样查看数据库引擎的报错 可以查看 alert log。 7. 比较 ...
一个数据库对象拥有的所有extents 被称为该对象的 segment. 三、数据库结构 * 查看表结构的方法:DESCRIBE 命令和 DBMS_METADATA.GET_DDL * 查看数据库引擎的报错:alert log 四、索引和约束 * 使用索引的理由...
在Oracle数据库中,数据存储在不同的逻辑结构中,包括表空间(Tablespace)、段(Segment)等。随着数据库的使用,这些存储区域会发生变化,导致存储空间分配不连续,即产生了所谓的“碎片”。当一个表空间内的空闲空间...
segment是一个数据库对象拥有的所有extents。 * 解释:data block是数据库中最小的逻辑存储单元,当数据库的对象需要更多的物理存储空间时,连续的data block就组成了extent。 索引和视图 * 使用索引的理由:快速...
Segment是数据库对象(如表或索引)占用的所有Extents的集合。 5. **检查表结构**:可以使用`DESCRIBE`命令或通过`DBMS_METADATA.GET_DDL`包获取DDL语句来查看表结构。 6. **查看数据库错误**:Alert Log是记录...