1. Trang chủ
  2. » Công Nghệ Thông Tin

Storage Structure and Relationships pdf

27 319 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

9 Copyright © Oracle Corporation, 2002. All rights reserved. Storage Structure and Relationships 9-2 Copyright © Oracle Corporation, 2002. All rights reserved. Objectives After completing this lesson, you should be able to do the following: • Describe the logical structure of the database • List the segment types and their uses • List the keywords that control block space usage • Obtain storage structure information 9-3 Copyright © Oracle Corporation, 2002. All rights reserved. Storage and Relationship Structure Database PROD DISK1/SYS1.dbf DISK2/ USER1.dbf DISK3/ USER2.dbf DISK1/ UNDO1.dbf DISK1/ TEMP.dbf D.D. Table Data Seg D.D. Index Index Seg RB Seg S_DEPT Data Seg S_EMP Data Seg Temp Temp Seg 1 2 1 2 1 2 1 1 2 2 1 FREE 1 1 2 2 1 EXTENTS S_DEPT (cont'd) Data Seg S_EMP FIRST_N AME Index Index Seg Oracle DATA BLOCKS RBS1 (cont'd) RB Seg RBS2 (cont'd) RB Seg RBS1 RB Seg RBS2 RB Seg SEGMENTS SYSTEM USER_DATA RBS TEMP TABLESPACES DATA FILES 9-4 Copyright © Oracle Corporation, 2002. All rights reserved. Types of Segments Table Cluster Table partition Index 9-6 Copyright © Oracle Corporation, 2002. All rights reserved. Types of Segments Index-organized table Index partition Undo segment Temporary segment 9-7 Copyright © Oracle Corporation, 2002. All rights reserved. Types of Segments LOB segmen t Bootstrap segment Nested table 9-8 Copyright © Oracle Corporation, 2002. All rights reserved. Storage Clause Precedence Oracle default Tablespace Segment 9-9 Copyright © Oracle Corporation, 2002. All rights reserved. Extent Allocation and Deallocation • An extent is a chunk of space used by a segment within a tablespace. • An extent is allocated when the segment is: – Created – Extended – Altered • An extent is deallocated when the segment is: – Dropped – Altered – Truncated 9-10 Copyright © Oracle Corporation, 2002. All rights reserved. Used and Free Extents Data file Free extentUsed extentFile header 9-11 Copyright © Oracle Corporation, 2002. All rights reserved. Database Block • Minimum unit of I/O • Consists of one or more operating system blocks • Set at tablespace creation • DB_BLOCK_SIZE is the default block size [...]... database can be created with a standard block size and up to four nonstandard block sizes • Block sizes can have any power-of-two value between 2 KB and 32 KB 9-12 Copyright © Oracle Corporation, 2002 All rights reserved Standard Block Size • Set at database creation using the DB_BLOCK_SIZE parameter; cannot be changed without re-creating the database • Used for SYSTEM and TEMPORARY tablespaces • DB_CACHE_SIZE... information stored in the segment • Determine extent sizes using the storage clause • Control block space utilization • Obtain storage structure information 9-32 Copyright © Oracle Corporation, 2002 All rights reserved Practice 9 Overview This practice covers identifying and obtaining information on the various types of storage structures in the database 9-33 Copyright © Oracle Corporation, 2002 All... 8 KB blocks DB_16K_CACHE_SIZE for 16 KB blocks DB_32K_CACHE_SIZE for 32 KB blocks • DB_nK_CACHE_SIZE is not allowed if nK is the standard block size • Minimum size for each cache is one granule 9-15 Copyright © Oracle Corporation, 2002 All rights reserved Creating Nonstandard Block Size Tablespaces CREATE TABLESPACE tbs_1 DATAFILE 'tbs_1.dbf' SIZE 10M BLOCKSIZE 4K; DESCRIBE dba_tablespaces Name Null?... must reside in tablespaces of the same block size • All temporary tablespaces, including the permanent ones that are being used as default temporary tablespaces, must be of standard block size • Index-organized table overflow and out-of-line LOB segments can be stored in a tablespace with a block size different from the base table 9-19 Copyright © Oracle Corporation, 2002 All rights reserved Database... Usage PCTFREE=20 Inserts PCTUSED=40 80% Inserts (off freelist) 1 Inserts 2 80% 40% 3 9-28 Insert (on freelist) 4 Copyright © Oracle Corporation, 2002 All rights reserved Obtaining Storage Information Information about storage can be obtained by querying the following views: • DBA_EXTENTS • DBA_SEGMENTS • DBA_TABLESPACES • DBA_DATA_FILES • DBA_FREE_SPACE 9-29 Copyright © Oracle Corporation, 2002 All... TEMPORARY tablespaces • DB_CACHE_SIZE specifies the size of the DEFAULT buffer cache for standard block size: – Minimum size = one granule (4 MB or 16 MB) – Default value = 48 MB 9-13 Copyright © Oracle Corporation, 2002 All rights reserved 9-14 Copyright © Oracle Corporation, 2002 All rights reserved Nonstandard Block Size • Configure additional caches with the following dynamic parameters: – –... management 9-23 Copyright © Oracle Corporation, 2002 All rights reserved Automatic Segment-Space Management • It is a method of managing free space inside database segments • Tracking in-segment free and used space is done using bitmaps as opposed to using free lists • This method provides: – Ease of management – Better space utilization – Better performance for concurrent INSERT operations 9-24 Copyright . 9 Copyright © Oracle Corporation, 2002. All rights reserved. Storage Structure and Relationships 9-2 Copyright © Oracle Corporation, 2002. All rights reserved. Objectives After. following: • Describe the logical structure of the database • List the segment types and their uses • List the keywords that control block space usage • Obtain storage structure information 9-3 Copyright. Support • A database can be created with a standard block size and up to four nonstandard block sizes. • Block sizes can have any power-of-two value between 2 KB and 32 KB. 9-13 Copyright © Oracle Corporation,

Ngày đăng: 29/03/2014, 16:20

Xem thêm: Storage Structure and Relationships pdf

Mục lục

    Storage Structure and Relationships

    Storage and Relationship Structure

    Extent Allocation and Deallocation

    Used and Free Extents

    Multiple Block Size Support

    Creating Nonstandard Block Size Tablespaces

    Multiple Block Sizing Rules

    Block Space Utilization Parameters

    Configuring Automatic Segment-Space Management

    Manual Data Block Management

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN