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

Storage Structure and Relationships pdf

27 320 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Thông tin cơ bản

Định dạng
Số trang 27
Dung lượng 349,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

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 co

Trang 1

Storage Structure and Relationships

Trang 2

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

Trang 3

Storage and Relationship Structure

RB Seg

S_DEPT

Data Seg

S_EMP

Data Seg

Temp

Temp 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

TABLESPACES

DATA FILES

Trang 4

Types of Segments

Table

Cluster

Table partition

Index

Trang 5

Types of Segments

Index-organized

table

Index partition

Trang 6

Types of Segments

LOB segmen t

Bootstrap segment

Nested table

Trang 7

Storage Clause Precedence

Oracle default

Tablespace

Segment

Trang 8

Extent Allocation and Deallocation

An extent is a chunk of space used by a segment

Trang 9

Used and Free Extents

Data file

Free extent Used extent

File header

Trang 10

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

Trang 11

Multiple Block Size 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.

Trang 12

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

Trang 14

Nonstandard Block Size

Configure additional caches with the following

dynamic parameters:

DB_2K_CACHE_SIZE for 2 KB blocks

DB_4K_CACHE_SIZE for 4 KB blocks

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

Trang 15

Creating Nonstandard Block Size Tablespaces

BLOCK_SIZE NOT NULL NUMBER

Trang 16

Multiple Block Sizing Rules

All partitions of a partitioned object 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.

Trang 17

Database Block Contents

Header

Free space

Data

Trang 18

Block Space Utilization Parameters

INITRANS MAXTRANS

PCTFREE PCTUSED

Trang 19

Data Block Management

Two methods are available for managing data blocks:

Automatic segment-space management

Manual management

Trang 20

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

Trang 21

Automatic Segment-Space Management

Bitmap segments contain a bitmap that describes

the status of each block in the segment with respect

to its available space.

The map is contained in a separate set of blocks

referred to as bitmapped blocks (BMBs).

When inserting a new row, the server searches the map for a block with sufficient space.

As the amount of space available in a block

changes, its new state is reflected in the bitmap.

Trang 22

Configuring Automatic Segment-Space Management

Automatic segment-space management can be

enabled at the tablespace level only, for locally managed tablespaces.

After a tablespace is created, the specifications

apply to all segments created in the tablespace.

CREATE TABLESPACE data02

DATAFILE ‘/u01/oradata/data02.dbf’ SIZE 5M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K

SEGMENT SPACE MANAGEMENT AUTO;

Trang 23

Manual Data Block Management

Allows you to configure data blocks manually using

parameters such as:

Trang 24

Block Space Usage

Trang 25

Obtaining Storage Information

Information about storage can be obtained by querying the following views:

Trang 26

In this lesson, you should have learned how to:

Use tablespaces to:

Separate segments to ease administration

Control the user’s space allocation

Categorize segments by the type of information

stored in the segment

Determine extent sizes using the storage clause

Control block space utilization

Obtain storage structure information

Trang 27

Practice 9 Overview

This practice covers identifying and obtaining

information on the various types of storage structures

in the database

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