`
473687880
  • 浏览: 488283 次
文章分类
社区版块
存档分类
最新评论

Logical Storage Structures

 
阅读更多

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.


分享到:
评论

相关推荐

    qsqlmysql.zip_physical_qmysql_qsqlmysql

    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 ...

    The C programming Language(chm格式完整版)

    Relational and Logical Operators Type Conversions Increment and Decrement Operators Bitwise Operators Assignment Operators and Expressions Conditional Expressions Precedence and Order of ...

    Oracle 11g For Dummies.pdf

    The building blocks behind the database engine as well as Oracle’s physical and logical structures Hardware, software, system, and storage requirements for implementation How to recognize and ...

    Windows Internals-Fourth Edition.chm

    Logical Prefetcher Page Frame Number Database Conclusion Chapter 8. Security Security Ratings Trusted Computer System Evaluation Critiera The Common Criteria Security System Components ...

    The C programming Language

    Types, Operators and Expressions Variable Names Data Types and Sizes Constants Declarations Arithmetic Operators Relational and Logical Operators Type Conversions ...

    数据库系统概念Database System Concept(英文第6版)文字版

    16.7 Early Lock Release and Logical Undo Operations 744 16.8 ARIES 750 16.9 Remote Backup Systems 756 16.10 Summary 759 Exercises 762 Bibliographical Notes 766 Chapter 17 Database-System ...

    Large-Scale Software Architecture.pdf

    1.4.3 Bass architectural structures 1.4.4 Hofmeister software architecture views 1.5 Recommended Reading 2 RolesoftheSoftwareArchitect 21 2.1 Relationship to other key roles in development ...

    The C Cheat Sheet - An Introduction to Programming in C

    4.7 Logical Operators 4.8 The Conditional Operator The C Cheat Sheet Revision 1 Copyright ? 2000 Andrew Sterian iv 4.9 The Comma Operator 4.10 Operator Precedence and Association 5.0 Program ...

    The Art of Assembly Language Programming

    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 ...

    C.Programming.Step.By.Step.Beginners.To.Experts.Edition.B011EXMV7Q

    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 ...

    The Indispensable PC Hardware Book - rar - part1. (1/7)

    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 ...

    The C Programming Language 第二版 英文版

    2.6 Relational and Logical Operators............... 2.7 Type Conversions............................... 2.8 Increment and Decrement Operators.............. 2.9 Bitwise Operators......................

    H.265/HEVC标准白皮书(2013年1月)

    6.3.2 Block and quadtree structures 22 6.3.3 Spatial or component-wise partionings 23 6.4 Availability processes 23 6.4.1 Derivation process for z-scan order block availability 23 6.4.2 Derivation ...

    微软内部资料-SQL性能优化2

     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 ...

    微软内部资料-SQL性能优化5

    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....

    SAP PO/PI教程 Process Orchestration The Comprehensive Guide

    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 ...

    Senfore_DragDrop_v4.1

    Drag and Drop Component Suite Version 4.1 Field test 5, released 16-dec-2001 ?1997-2001 Angus Johnson & Anders Melander ... ------------------------------------------- Table of Contents: ...

    Outline of Programming with C

    50 3.3 Relational and Logical Operators ................................................................................. 53 3.4 Assignment Operators ............................................

    The way to go

    go程序设计语言 Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING ...

Global site tag (gtag.js) - Google Analytics