Introduction to Logical Storage Structures
Oracle Database allocates logical space for all data in the database. The logical units of database space allocation are data blocks, extents, segments, and tablespaces. At a physical level,
the data is stored in data files on disk (see Chapter 11, "Physical Storage Structures"). The data in the data files is stored in operating system blocks.
Figure 12–1 is an entity-relationship diagram for physical and logical storage. The crow's foot notation represents a one-to-many relationship.

Logical Storage Hierarchy
Figure 12–2 shows the relationships among data blocks, extents, and segments within a tablespace. In this example, a segment
has two extents stored in different data files.

At the finest level of granularity, Oracle Database stores data in data blocks. One logical data block corresponds to a specific
number of bytes of physical disk space, for example, 2 KB. Data blocks are the smallest units of storage that Oracle Database can use or allocate.
An extent is a set of logically contiguous data blocks allocated for storing a specific type of information. In Figure 12–2, the 24 KB extent has 12 data blocks, while the 72 KB extent
has 36 data blocks.
A segment is a set of extents allocated for a specific database object, such as a table. For example, the data for the employees table is stored in its own data segment, whereas each
index for employees is stored in its own index segment. Every database object that consumes storage consists of a single segment.
Each segment belongs to one and only one tablespace. Thus, all extents for a segment are stored in the same tablespace. Within a tablespace, a segment can include extents from multiple
data files, as shown in Figure 12–2. For example, one extent for a segment may be stored in users01.dbf, while another is stored in users02.dbf. A single extent can never span data files.
Logical Space Management
Oracle Database must use logical space management to track and allocate the extents in a tablespace. When a database object
requires an extent, the database must have a method of finding and providing it. Similarly, when an object no longer requires an extent, the database must have a method of making the free extent available.
Oracle Database manages space within a tablespace based on the type that you create. You can create either of the following types of tablespaces:
■Locally managed tablespaces (default)
The database uses bitmaps in the tablespaces themselves to manage extents. Thus, locally managed tablespaces have a part of the tablespace set aside for a bitmap. Within a tablespace,
the database can manage segments with automatic segment space management (ASSM) or manual segment space management (MSSM).
■Dictionary-managed tablespaces
The database uses the data dictionary to manage extents (see "Overview of the Data Dictionary" on page 6-1).

Locally Managed Tablespaces
A locally managed tablespace maintains a bitmap in the data file header to track free and used space in the data file body. Each bit corresponds to a group of blocks. When space is allocated
or freed, Oracle Database changes the bitmap values to reflect the new status of the blocks.
The following graphic is a conceptual representation of bitmap-managed storage. A 1 in the header refers to used space, whereas a 0 refers to free space.

■Avoids using the data dictionary to manage extents
Recursive operations can occur in dictionary-managed tablespaces if consuming or releasing space in an extent results in another operation that consumes or releases space in a data dictionary
table or undo segment.
■Tracks adjacent free space automatically
In this way, the database eliminates the need to coalesce free extents.
■Determines the size of locally managed extents automatically
Alternatively, all extents can have the same size in a locally managed tablespace and override object storage options.
Note:
Oracle strongly recommends the use of locally managed tablespaces with Automatic Segment Space Management.
Segment space management is an attribute inherited from the tablespace that contains the segment. Within a locally managed
tablespace, the database can manage segments automatically or manually. For example, segments in tablespace users can be managed automatically while segments in tablespace tools are managed manually.
Automatic Segment Space Management
The ASSM method uses bitmaps to manage space. Bitmaps provide the following advantages:
■Simplified administration
ASSM avoids the need to manually determine correct settings for many storage parameters. Only one crucial SQL parameter controls space allocation: PCTFREE. This parameter specifies the
percentage of space to be reserved in a block for future updates (see "Percentage of Free Space in Data Blocks" on page 12-12).
■Increased concurrency
Multiple transactions can search separate lists of free data blocks, thereby reducing contention and waits. For many standard workloads, application performance with ASSM is better than the performance of a well-tuned application that uses MSSM.
■Dynamic affinity of space to instances in an Oracle Real Application Clusters (Oracle RAC) environment
ASSM is more efficient and is the default for permanent, locally managed tablespaces
Note:
This chapter assumes the use of ASSM in all of its discussions of logical storage space.
Dictionary-Managed Tablespaces
A dictionary-managed tablespace uses the data dictionary to manage its extents. Oracle Database updates tables in the data dictionary whenever an extent is allocated or freed for reuse.
For example, when a table needs an extent, the database queries the data dictionary tables, and searches for free extents. If the database finds space, then it modifies one data dictionary table and inserts a row into another. In this way, the database manages
space by modifying and moving data.
The SQL that the database executes in the background to obtain space for database objects is recursive SQL. Frequent use of recursive SQL can have a negative impact on performance because
updates to the data dictionary must be serialized. Locally managed tablespaces, which are the default, avoid this performance problem.
分享到:
相关推荐
Oracle Database XE completely automates the management of its logical and physical structures and flash recovery area storage. You use the Oracle Database XE graphical user interface to monitor these ...
Relational and Logical Operators Type Conversions Increment and Decrement Operators Bitwise Operators Assignment Operators and Expressions Conditional Expressions Precedence and Order of ...
Logical Prefetcher Page Frame Number Database Conclusion Chapter 8. Security Security Ratings Trusted Computer System Evaluation Critiera The Common Criteria Security System Components ...
Types, Operators and Expressions Variable Names Data Types and Sizes Constants Declarations Arithmetic Operators Relational and Logical Operators Type Conversions ...
Storage classes determine the scope and lifetime of variables. ##### The auto Storage Class The default storage class for local variables. - **Lifetime:** From the point of declaration until the ...
- **Combining Logical Operators**: Use of logical operators (`&&`, `||`, `!`) to combine conditions. - **Lumping Code Together**: Techniques for grouping related statements together, such as using ...
Allocating Storage for Multidimensional Arrays 5.6.2.4 - Accessing Multidimensional Array Elements in Assembly Language 5.6.3 - Structures 5.6.4 - Arrays of Structures and Arrays/Structures ...
- **存储类别指定器(Storage Class Specifiers)**:如`auto`, `static`, `extern`, `register`,决定变量的生命周期和作用域。 3. **表达式和运算符**: - **表达式(Expressions)**:由运算符连接的变量或...
- **Proc Filesystem** (`/proc`): A virtual filesystem that provides access to kernel data structures and processes. #### Hardware, Devices, and Tools This section covers various hardware utilities ...
Control programs by testing data and using logical operators Save time and effort by using loops and other techniques Build powerful data-entry routines with simple built-in functions Manipulate text ...
- **Data Retrieval and Storage:** Integration with external data sources like Microsoft Excel for retrieving and storing data, facilitating data-driven design. #### Conclusion Grasshopper is a ...
Differences in register structures. Differences in memory management. i486 reset. i486 real mode. i486 protected mode. i486 virtual 8086 mode. Integer core and floating-point unit. FPU ...
2. **Address Spaces**: The logical view of memory used by a process. It may differ from the physical memory layout managed by the OS. 3. **Files**: Files are used for storing data persistently. The ...
Windows 2000 Server Operations Guide, Storage, File Systems, and Printing; Chapters: Evaluating Memory and Cache Usage Advanced Windows, 4th Edition, Jeffrey Richter, Microsoft Press Related ...
The only source of any storage location information is the sysindexes table, which keeps track of the address of the root page for every index, and the first IAM page for the index or table....
1.3.3 SAP NetWeaver AS Java System Logical Layers 1.4 Installation Options 1.4.1 Case 1: SAP Process Integration Dual Stack 1.4.2 Case 2: SAP PI Dual Stack and SAP Composition Environment in ...
2.1 Information Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.1.1 HexadecimalNotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 ...
Drag and Drop Component Suite Version 4.1 Field test 5, released 16-dec-2001 ?1997-2001 Angus Johnson & Anders Melander ... ------------------------------------------- Table of Contents: ...