• Data Blocks, Extents, and Segments


    http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c03block.htm

    Introduction to Data Blocks, Extents, and Segments

    Oracle allocates logical database space for all data in a database. The units of database space allocation are data blocks, extents, and segments. Figure 2-1 shows the relationships among these data structures:

    Figure 2-1 The Relationships Among Segments, Extents, and Data Blocks

    Text description of cncpt027.gif follows
    Text description of the illustration cncpt027.gif


    At the finest level of granularity, Oracle stores data in data blocks (also called logical blocksOracle blocks, or pages). One data block corresponds to a specific number of bytes of physical database space on disk.

    The next level of logical database space is an extent. An extent is a specific number of contiguous data blocks allocated for storing a specific type of information.

    The level of logical database storage above an extent is called a segment. A segment is a set of extents, each of which has been allocated for a specific data structure and all of which are stored in the same tablespace. For example, each table's data is stored in its own data segment, while each index's data is stored in its own index segment. If the table or index is partitioned, each partition is stored in its own segment.

    Oracle allocates space for segments in units of one extent. When the existing extents of a segment are full, Oracle allocates another extent for that segment. Because extents are allocated as needed, the extents of a segment may or may not be contiguous on disk.

    A segment and all its extents are stored in one tablespace. Within a tablespace, a segment can include extents from more than one file; that is, the segment can span datafiles. However, each extent can contain data from only one datafile.

    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.

  • 相关阅读:
    ASP.NET MVC 5 安全性和创建用户角色
    使用ENTITY FRAMEWORK 6以正确的方式管理DBCONTEXT:深入指南
    C#读取二进制格式的shapefile
    ASP.NET MVC 应用程序初学者常见问题汇总
    ASP.NET MVC 应用程序中使用CKEditor 4 的步骤
    html5学习笔记2
    html5学习笔记
    c#接口定义与应用
    Django ORM 优化心得
    携程的那点事
  • 原文地址:https://www.cnblogs.com/wucg/p/2242398.html
Copyright © 2020-2023  润新知