Documente Academic
Documente Profesional
Documente Cultură
Page 1 of 5
Home
E-mail Us
Oracle Articles
Oracle Training
Oracle Tips
Oracle Forum
10gr2 Note: Starting in Oracle 10g release2, Oracle recommends not setting the
db_file_multiblock_read_count parameter, allowing Oracle to empirically determine the
optimal setting. For more details, see my notes on 10gR2 automatically tuned multi-block
reads. Also, see my related important notes on tuning full-scan I/O.
Oracle Tips
Got Questions?
ORA 19815
Warning
Restart a Failed
Daemon Process
ORA 20000 ORU
10027 buffer
overflow limit of
2000 bytes
BEWARE of
11gR2 Upgrade
Gotchas!
Class Catalog
Remote DBA
Because all Oracle databases retrieve and store data, the relative cost of physical disk access is
an important topic. In Oracle, we see two types of data block access:
Oracle Tuning
Emergency 911
RAC Support
Apps Support
Analysis
Design
Physical disk speed is an important factor in weighing these costs. Faster disk access speeds
can reduce the costs of a full-table scan vs. single block reads to a negligible level.
Implementation
Oracle Support
For example, the new solid state disks provide up to 100,000 I/Os per second, six times faster
than traditional disk devices. In a solid-state disk environment, disk I/O is much faster and
multiblock reads become far cheaper than with traditional disks.
SQL Tuning
The standard STATSPACK report can be generated when the database is processing a peak
load, and you can get a super-detailed report of all elapsed-time metrics. The most important
of these metrics is the STATSPACK top-five timed events. This report is critical because it
shows the database events that constitute the bottleneck for the system. We can also see the
same phenomenon where a system is disk I/O bound. In the STATSPACK report in Listing A,
we see that the system is clearly constrained by disk I/O.
Security
Oracle UNIX
Oracle Linux
Monitoring
Remote support
Remote plans
Remote services
Event
Waits
Time (s)
--------------------------- ------------ ----------db file sequential read
2,598
7,146
db file scattered read
25,519
3,246
library cache load lock
673
1,363
CPU time
1,154
log file parallel write
19,157
837
Application Server
Applications
Oracle Forms
% Total
Ela Time
-------48.54
22.04
9.26
7.83
5.68
Oracle Portal
App Upgrades
SQL Server
Oracle Concepts
Software Support
Here we see that reads and a write constitute the majority of the total database time. In this
case, we would want to increase the RAM size of the db_cache_size to reduce disk I/O, tune
the SQL to reduce disk I/O, or invest in a faster disk I/O subsystem.
Remote Support
Development
Implementation
Consulting Staff
Consulting Prices
The ideal optimizer settings depend on your environment and are heavily influenced by your
system's costs for scattered disk reads vs. sequential disk reads. Below is a great script you
can use to measure these I/O costs on your database.
col
col
col
col
col
c1
c2
c3
c4
c5
heading
heading
heading
heading
heading
format
format
format
format
format
9999.999
9999.999
9.99
9.99
999
Help Wanted!
Oracle Posters
Oracle Books
Oracle Scripts
select
a.average_wait
b.average_wait
a.total_waits /(a.total_waits + b.total_waits)
b.total_waits /(a.total_waits + b.total_waits)
(b.average_wait / a.average_wait)*100
from
v$system_event a,
v$system_event b
where
a.event = 'db file scattered read'
and
b.event = 'db file sequential read';
c1,
c2,
c3,
c4,
c5
http://www.dba-oracle.com/art_builder_io_speed.htm
12.06.2013
Page 2 of 5
Ion
Excel-DB
With all of these factors, it may be impossible to determine the exact best setting for the
weight in optimizer_index_cost_adj. In the real world, the decision to invoke a full-table scan
is heavily influenced by run-time factors such as:
Hence, it follows that the optimizer_index_cost_adj should change frequently, as the load
changes on the server.
However, is it safe to assume that all of the SOFTS factors are reflected in the relative I/O
speed of FTS vs. index access? If we make this assumption, we've measured the relative speed
in v$system_event and have a foundation for creating a self-tuning parameter. To do this, we
must accept the following assumptions:
No systems are alike, and good DBAs must adjust optimizer_index_cost_adj according
to their configuration and data access patterns.
The overall amount of time spent performing full-table scans is equal to the percentage
of db file sequential read waits as a percentage of total I/O waits from v$system_event:
(avg-wait-for-db-file-sequential-read /
avg-wait-for-db-file-scattered-read)
* 100
http://www.dba-oracle.com/art_builder_io_speed.htm
12.06.2013
Page 3 of 5
Here is sample output from a real system showing an empirical showing the numbers. We
always expect scattered reads (full-table scans) to be far faster than sequential reads (index
probes) because of Oracle sequential prefetch (db_file_multiblock_read_count):
- scattered read (full table scans) are fast at 13ms (c3)
- sequential reads (index probes) take much longer 86ms (c4)
- starting setting for optimizer_index_cost_adj at 36:
C1
C2
C3
C4
C5
---------- ---------- ---------- ---------- ---------13,824
5,072
13
86
36
Snap
Full Scan Read I/O
Index Read I/O
Full Scans
Index Scans
---------- ------------------ ----------------- ------------- -------------5079
.936
.074
10.14
89.86
5080
.936
.074
10.14
89.86
5081
.936
.074
10.14
89.86
5082
.936
.074
10.14
89.86
5083
.936
.074
10.13
89.87
5084
.936
.074
10.13
89.87
5085
.936
.074
10.13
89.87
http://www.dba-oracle.com/art_builder_io_speed.htm
12.06.2013
Page 4 of 5
Important Note: Prior to Oracle 10g, adjusting these optimizer parameters was the only way
to compensate for sample size issues with dbms_stats. As of 10g, the use of
dbms_stats.gather_system_stats and improved sampling within dbms_stats had made
adjustments to these parameters far less important. Ceteris Parabus, always adjust CBO
statistics before adjusting optimizer parms. For more details on optimizer parameters, see my
latest book "Oracle Tuning: The Definitive Reference".
Note: This Oracle documentation was created as a support and Oracle training
reference for use by our DBA performance tuning consulting professionals. Feel
free to ask questions on our Oracle forum.
Verify experience! Anyone considering using the services of an Oracle support
expert should independently investigate their credentials and experience, and
not rely on advertisements and self-proclaimed expertise. All legitimate Oracle
experts publish their Oracle qualifications.
Errata? Oracle technology is changing and we strive to update our BC Oracle
support information. If you find an error or have a suggestion for improving our
content, we would appreciate your feedback. Just e-mail:
and include the URL for the page.
http://www.dba-oracle.com/art_builder_io_speed.htm
12.06.2013
Page 5 of 5
Burleson Consulting
The Oracle of Database Support
Oracle Performance Tuning
http://www.dba-oracle.com/art_builder_io_speed.htm
12.06.2013