11
Blocks Oracle database data is stored in data blocks. One data block corresponds to a specific number of bytes of physical database space on dis k. (e.g. 1 block = 16 Kbytes) Extents  An extent is a specific number of contiguous data blocks, obtained in a single allocation, used to store a specific type of information. A small table may f it in a single extent, a large table may require multiple extents. Segments The level of logical database storage above an extent is called a segment.  A segment is a set of extents allocated for a certain logical structure: Data /Index /Rollback/ Temporary segment. The allocation of extents for a given segment is handled different for Locally Managed Tablespaces and Dictionary Managed Tablespaces. Extent deallocation In general, the extents of a segment do not return to the tablespace until you drop the schema object whose data is stored in the . Exceptions to this include the following:  _ The TRUNCATE...DROP STORAGE statement. Rollback segments with the OPTIMAL size specified.  _ Manual deallocation using the following SQL syntax:  ALTER TABLE table_name DEALLOCATE UNUSED;  After you DROP a nonclustered table Oracle makes the extents available for other schema objects in the same tablespace. Block Sizes The block size of the SYSTEM tablespace is termed the standard block size. This is set when the database is created and can be any valid size. Early versions of Oracle supported just one block size set at database creation, you can now specify up to four nonstandard block sizes, in addition to a standard block size. In the initialization file, you can configure subcaches within the buffer cache for each of these block sizes. Subcaches can also be configured while an instance is running. You can create tablespaces having any of these block sizes. The standard block size is used for the system tablespace and most other t ablespaces. All  partitions of a partitioned object must r eside in tablespaces of a single block size. Multiple block sizes are useful primarily when transporting a tablespace from an OLTP database to an enterprise data warehouse. "Ever notice that the area of a department store containin g completely useless objects is called 'gifts?' - Anon See also

Oracle Storage - Blocks, Extents, Segments

Embed Size (px)

Citation preview

Page 1: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 1/11

BlocksOracle database data is stored in data blocks. One data block corresponds to a specific number of bytes of physical database space on disk. (e.g. 1 block = 16 Kbytes)

Extents

An extent is a specific number of contiguous data blocks, obtained in a single allocation, used tostore a specific type of information. A small table may fit in a single extent, a large table may require multiple extents.

SegmentsThe level of logical database storage above an extent is called a segment. A segment is a set of extents allocated for a certain logical structure: Data /Index /Rollback/ Temporary segment. The allocation of extents for a given segment is handled different for Locally Managed Tablespaces and Dictionary Managed Tablespaces.

Extent deallocation

In general, the extents of a segment do not return to the tablespace until you drop the schemaobject whose data is stored in the . Exceptions to this include the following: _ The TRUNCATE...DROP STORAGE statement.Rollback segments with the OPTIMAL size specified. _ Manual deallocation using the following SQL syntax: ALTER TABLE table_name DEALLOCATE UNUSED;

After you DROP a nonclustered table Oracle makes the extents available for other schema objectsin the same tablespace.

Block Sizes

The block size of the SYSTEM tablespace is termed the standard block size. This is set when thedatabase is created and can be any valid size.Early versions of Oracle supported just one block size set at database creation, you can now specify up to four nonstandard block sizes, in addition to a standard block size.

In the initialization file, you can configure subcaches within the buffer cache for each of these block sizes. Subcaches can also be configured while an instance is running. You can create tablespaceshaving any of these block sizes.

The standard block size is used for the system tablespace and most other tablespaces. All partitions of a partitioned object must reside in tablespaces of a single block size. Multiple block sizes are useful primarily when transporting a tablespace from an OLTP database to an enterprisedata warehouse.

"Ever notice that the area of a department store containing completely useless objects is called 'gifts?' - Anon

See also

Page 2: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 2/11

CREATE TABLESPACE

Page 3: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 3/11

Page 4: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 4/11

Page 5: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 5/11

Page 6: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 6/11

Page 7: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 7/11

Page 8: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 8/11

Page 9: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 9/11

son

Page 10: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 10/11

Father

Page 11: Oracle Storage - Blocks, Extents, Segments

8/9/2019 Oracle Storage - Blocks, Extents, Segments

http://slidepdf.com/reader/full/oracle-storage-blocks-extents-segments 11/11

© Copyright SS64.com 1999-2010