Documente Academic
Documente Profesional
Documente Cultură
Home
Articles
Search
About
Scripts
Forums
Blog
Page 1 of 9
Certification
Misc
Printer Friendly
Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC |
Oracle Apps | Linux
Home
Articles
10g
Here
Tweet10
Search
Performance Tuning
Enhancements in Oracle
Database 10g
Oracle 10g includes many performance tuning
enhancements including:
Automatic Performance Diagnostic and
Tuning Features
Automatic Shared Memory
Management
Wait Model Improvements
Automatic Optimizer Statistics
Collection
Dynamic Sampling
CPU Costing
Optimizer Hints
Rule Based Optimizer Obsolescence
Tracing Enhancements
SAMPLE Clause Enhancements
Hash Partitioned Global Indexes
Content blocked
While trying
to retrieve
the URL:
http://googleads.g.doubleclick.net/pagead/ads?client=ca
10g.php&dt=1366635199501&bpp=1&shv=r20130411&cbv=r201302
3A//www.oracle-base.com
The content
is blocked
due to the
following
condition:
The URL you have requested is blocked by a blacklist. If you think this
Your cache
administrator
mail-admin@scheidt-bachmann.de
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
Page 2 of 9
If these parameters are set to a non-zero value they represent the minimum size for the pool. These
minimum values may be necessary if you experience application errors when certain pool sizes drop
below a specific threshold.
The following parameters must be set manually and take memory from the quota allocated by the
SGA_TARGET parameter.
DB_KEEP_CACHE_SIZE
DB_RECYCLE_CACHE_SIZE
DB_nK_CACHE_SIZE (non-default block size)
STREAMS_POOL_SIZE
LOG_BUFFER
V$ACTIVE_SESSION_HISTORY
V$SESSION_WAIT_HISTORY
V$SESS_TIME_MODEL
V$SYS_TIME_MODEL
V$SYSTEM_WAIT_CLASS
V$SESSION_WAIT_CLASS
V$EVENT_HISTOGRAM
V$FILE_HISTOGRAM
V$TEMP_HISTOGRAM
The following are some examples of how these updates can be used.
The V$EVENT_NAME view has had three new columns added (WAIT_CLASS_ID, WAIT_CLASS# and
WAIT_CLASS) which indicate the class of the event. This allows easier aggregation of event details.
-- Display time waited for each wait class.
SELECT a.wait_class, sum(b.time_waited)/1000000 time_waited
FROM
v$event_name a
JOIN v$system_event b ON a.name = b.event
GROUP BY a.wait_class;
WAIT_CLASS
TIME_WAITED
--------------------------- ----------Application
.013388
Commit
.003503
Concurrency
.009891
Configuration
.003489
Idle
232.470445
Network
.000432
Other
.025698
System I/O
.095651
User I/O
.109552
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
Page 3 of 9
9 rows selected.
The V$SESSION view has had several columns added that include blocking session and wait
information. The wait information means it's no longer necessary to join to V$SESSION_WAIT to get
wait information for a session.
-- Display blocked session and their blocking session details.
SELECT sid, serial#, blocking_session_status, blocking_session
FROM
v$session
WHERE blocking_session IS NOT NULL;
no rows selected
-- Display the resource or event the session is waiting for.
SELECT sid, serial#, event, (seconds_in_wait/1000000) seconds_in_wait
FROM
v$session
ORDER BY sid;
SID
SERIAL# EVENT
SECONDS_IN_WAIT
---------- ---------- ----------------------------------- --------------131
20 SQL*Net message from client
.000015
133
501 wakeup time manager
.000138
134
28448 SQL*Net message to client
0
135
4 queue messages
.000003
137
8 SQL*Net message from client
.000132
....
167
1 rdbms ipc message
0
168
1 rdbms ipc message
0
169
1 rdbms ipc message
.079485
170
1 pmon timer
.092645
29 rows selected.
The V$SESSION_WAIT_CLASS view allows you to see the session wait information broken down by
wait class for each session.
-- Display session wait information by wait class.
SELECT *
FROM
v$session_wait_class
WHERE sid = 134;
SID
SERIAL# WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS
TOTAL_WAITS T
---------- ---------- ------------- ----------- ------------------- ----------134
28448
4217450380
1 Application
2
134
28448
3875070507
4 Concurrency
1
134
28448
2723168908
6 Idle
5
134
28448
2000153315
7 Network
6
4 rows selected.
The V$SESSION_WAIT_HISTORY view shows historical wait information which allows you to identify
issues after the session has ended.
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
Page 4 of 9
Dynamic Sampling
Dynamic sampling enables the server to improve performance by:
Estimate single-table predicate selectivities where available statistics are missing or may lead to
bad estimations.
Estimate statatistics for tables and indexes with missing statistics.
Estimate statatistics for tables and indexes with out of date statistics.
Dynamic sampling is controled by the OPTIMIZER_DYNAMIC_SAMPLING parameter which accepts
values from "0" (off) to "10" (agressive sampling) with a default value of "2". At compile-time Oracle
determines if dynamic sampling would improve query performance. If so it issues recursive statements
to estimate the necessary statistics. Dynamic sampling can be beneficial when:
The sample time is small compared to the overall query execution time.
Dynamic sampling results in a better performing query.
The query may be executed multiple times.
In addition to the OPTIMIZER_DYNAMIC_SAMPLING system parameter the dynamic sampling level can
be set using the
DYNAMIC_SAMPLING optimizer hint for specific queries like the following.
SELECT /*+ dynamic_sampling(emp 10) */
empno, ename, job, sal
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
FROM
WHERE
Page 5 of 9
emp
deptno = 30;
The results of dynamic sampling are repeatable provided no rows are inserted, updated or deleted from
the sampled table. The OPTIMIZER_FEATURES_ENABLE parameter will turns off dynamic sampling if it
is set to a version earlier than 9.2.0.
CPU Costing
By default the cost model for the optimizer is now CPU+I/O, with the cost unit as time.
Optimizer Hints
New hints:
Updated hints:
Hints that specify table names have been expanded to accept Global Table Hints. This allows a
base table within a view to be specified using the "view-name.table-name" syntax.
Hints that specify index names have been expanded to accept Complex Index Hints. This allows
an index to be specified using the "(table-name.column-name)" syntax instead of the index name.
Some hints can now optionally accept a query block parameter.
Renamed hints:
NO_PARALLEL - Formally NOPARALLEL.
NO_PARALLEL_INDEX - Formally NOPARALLEL_INDEX.
NO_REWRITE - Formally NOREWRITE.
Deprecated hints:
AND_EQUAL
HASH_AJ
MERGE_AJ
NL_AJ
HASH_SJ
NL_SJ
EXPAND_GSET_TO_UNION
ORDERED_PREDICATES
ROWID
STAR
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
Page 6 of 9
Tracing Enhancements
The Oracle Trace functionality has been removed from Oracle 10g. Instead the SQL Trace and
TKPROF functionality should be used.
In multi-tier environments where statements are passed to different sessions by the application server it
can become difficult to trace an individual process from start to finish. To solve this problem Oracle have
introduced End to End Application Tracing which allows a client process to be identified via the client
identifier rather than the typical session id. Each piece of trace information is linked to the following
information.
Client Identifier - Specifies the "real" end user. Set using the DBMS_SESSION.SET_IDENTIFIER
procedure.
Service - Specifies a group of related applications. Created using the
DBMS_SERVICE.CREATE_SERVICE procedure.
Module - Specifies a functional area or feature of an application. Set using the
DBMS_APPLICATION_INFO.SET_MODULE procedure.
Action - Specifies the current action (INSERT, UPDATE, DELETE etc.) within the current module.
Set using the DBMS_APPLICATION_INFO.SET_ACTION procedure.
End to end tracing can be managed via Enterprise Manager or a set of APIs and views. Here are some
examples of how to enable and disable to various types of tracing.
BEGIN
-- Enable/Disable Client Identifier Trace.
DBMS_MONITOR.client_id_trace_enable (client_id => 'my_id');
DBMS_MONITOR.client_id_trace_disable (client_id => 'my_id');
-- Enable/Disable Service, Module and Action Trace (various overloads).
DBMS_MONITOR.serv_mod_act_trace_enable (
service_name => 'my_service');
DBMS_MONITOR.serv_mod_act_trace_enable (
service_name => 'my_service',
module_name
=> 'my_module');
DBMS_MONITOR.serv_mod_act_trace_enable (
service_name => 'my_service',
module_name
=> 'my_module',
action_name
=> 'INSERT');
DBMS_MONITOR.serv_mod_act_trace_disable (
service_name => 'my_service',
module_name
=> 'my_module',
action_name
=> 'INSERT');
-- Enable/Disable Session Trace (various overloads).
DBMS_MONITOR.session_trace_enable;
DBMS_MONITOR.session_trace_enable (
session_id => 15,
serial_num => 1234);
DBMS_MONITOR.session_trace_disable (
session_id => 15,
serial_num => 1234);
END;
/
Once the trace files are produced the trcsess command line utility can be used to filter out the
relevant data from multiple files. The utility accepts the following parameters:
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
Page 7 of 9
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013
Page 8 of 9
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
bersetzen
22.04.2013
Page 9 of 9
Tweet10
Home | Articles | Scripts | Forums | Blog | Certification | Misc | Search | About
Copyright & Disclaimer
HTML CSS
http://www.oracle-base.com/articles/10g/performance-tuning-enhancements-10g.php
22.04.2013