Documente Academic
Documente Profesional
Documente Cultură
Storage Enhancements
Objectives
5-2
11.2
Emulation mode:
LBA0
LBA1
LBA2
LBA3
LBA4
LBA5
Native mode:
Logical sector
LBA0
4096-byte physical sector
Physical sector
5-3
LBA6
LBA7
11.2
Emulation mode:
Native mode:
Recommended 4 KB block
Mandatory 4 KB block size
size for redo logs
for redo logs
Recommended 4 KB block
Mandatory 4 KB block size
size (or larger) for data files
(or larger) for data files
Not affected:
Control file block size: 16 KB
Data files
Control
files
Online redo
log files
Database
5-4
Archived
log files
11.2
5-5
11.2
5-6
11.2
No extra work
No GUI change
Default sector size based on hardware (not the earlier 512
bytes sectors)
5-7
11.2
Specifying BLOCKSIZE
ALTER DATABASE sample ADD LOGFILE GROUP 3
('$ORACLE_BASE/oradata/sample/redo03a.log',
'$ORACLE_BASE/oradata/sample/redo03b.log')
SIZE 500K BLOCKSIZE 4096;
CREATE CONTROLFILE REUSE DATABASE sample NORESETLOGS
FORCE LOGGING ARCHIVELOG
LOGFILE
GROUP 1 '$ORACLE_BASE/oradata/sample/redo01.log'
SIZE 100M BLOCKSIZE 4096,
GROUP 2 '$ORACLE_BASE/oradata/sample/redo02.log '
SIZE 100M BLOCKSIZE 4096
DATAFILE
5-8
11.2
11.2
5 - 10
Quiz
5 - 12
No impact on reads
Reads may actually see improved performance due to
fewer I/Os and enhanced memory efficiency.
5 - 13
Uncompressed
data
Compressed
data
Data block
Header
PCTFREE reached
triggers compression.
PCTFREE
limit
Free
space
5 - 14
Inserts are
uncompressed.
PCTFREE reached
triggers compression.
11.2
update
Compression
Ratio
CPU
Overhead
CREATE and
ALTER TABLE
Syntax
Basic
compression
High
Minimal
OLTP table
compression
High
Minimal
COMPRESS FOR
OLTP
5 - 15
Typical
Apps
OLTP, DSS
11.2
changes
11.2
5 - 19
Solution
SQL
Access
Advisor
DBA
Workload
No expertise
required
Component
of CBO
Provides
implementation
script
5 - 20
SQL Access
Advisor
SQL cache
Workload
Hypothetical
STS
Filter
Options
Indexes
5 - 21
Materialized
views
Materialized Partitioned
views log
objects
Possible Recommendations
Recommendation
Comprehensive
Limited
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
5 - 22
5 - 23
Step 1
CREATE_TASK
UPDATE_TASK_ATTRIBUTES
DELETE_TASK
QUICK_TUNE
Task-dependent
Advisor-dependent
SQL
Access Advisor
task
Report/Scripts
SET_TASK_PARAMETER
RESET_TASK
Step 2
5 - 24
BEGIN
dbms_advisor.create_task(dbms_advisor.sqlaccess_advisor,'MYTASK');
END;
BEGIN
dbms_advisor.set_task_parameter('MYTASK','ANALYSIS_SCOPE','ALL');
dbms_advisor.set_task_parameter('MYTASK','MODE','COMPREHENSIVE');
END;
BEGIN
dbms_advisor.add_sts_ref('MYTASK','SH','MYSTS');
dbms_advisor.execute_task('MYTASK');
dbms_output.put_line(dbms_advisor.get_task_script('MYTASK'));
END;
5 - 25
DBA_TEMP_FREE_SPACE
Lists temporary space usage information
Central point for temporary tablespace space usage
Column name
Description
TABLESPACE_NAME
TABLESPACE_SIZE
ALLOCATED_SPACE
FREE_SPACE
5 - 27
5 - 28
11.2
CREATE TABLE
5 - 29
INSERT INTO
Save disk space
Improve installation time
of applications with
large schemas
Copyright 2009, Oracle. All rights reserved.
11.2
11.2
11.2
5 - 32
11.2
5 - 33
Quiz
Which of the following statements are true for Oracle
Database 11g Release 2?
1. Deferred segment creation is always enabled. You
cannot control it.
2. You can control the deferred segment creation with the
SEGMENT CREATION clause of the CREATE TABLE
command.
3. Segment creation on demand is available for all types
of tables, including those owned by the SYS user.
4. Segment creation on demand is available for
nonpartitioned tables.
5 - 34
Summary
5 - 35
Practice 5: Overview
5 - 36