||Oracle Tips by Burleson
Disk I/O and the Shared Pool
The shared SQL area contains the Pcode versions of all of the
current SQL commands that haven’t been aged out of the shared pool.
Numerous statistics are available via the v$sqlarea DPT. The text of
SQL statements in the shared pool can be retrieved (at least the
first tens of bytes) from the v$sqltext and v$sqlarea DPTs. Let’s
look at a report that displays the SQL statements in the SQL area
with the greatest number of disk reads (these will probably be the
ones you will want to review and tune). Look at the report in Source
13.10. Output from this report is shown in Listing 13.11.
SOURCE 13.10 SQL versus disk reads
REM Name: sqldrd.sql
REM Function: return the sql statements from the shared area with
REM Function: highest disk reads
REM History: Presented in paper 35 at IOUG-A 1997, converted for
REM use 6/24/97 MRA
DEFINE access_level = 1000 (NUMBER)
COLUMN parsing_user_id FORMAT 9999999 HEADING ‘User Id’
COLUMN executions FORMAT 9999 HEADING ‘Exec’
COLUMN sorts FORMAT 99999 HEADING ‘Sorts’
COLUMN command_type FORMAT 99999 HEADING ‘CmdT’
COLUMN disk_reads FORMAT 999,999,999 HEADING ‘Block Reads’
COLUMN sql_text FORMAT a40 HEADING ‘Statement’ WORD_WRAPPED
SET LINES 130 VERIFY OFF FEEDBACK OFF
START title132 'SQL Statements With High Reads'
See Code Depot
By tuning those statements that show large numbers of disk reads,
the overall performance of the application is increased.
This is an excerpt by Mike Ault’s book “Oracle
Administration & Management” . If you want more current Oracle
tips by Mike Ault, check out his new book “Mike
Ault’s Oracle Internals Monitoring & Tuning Scripts” or Ault’s
Oracle Scripts Download.
Copyright © 1996 - 2014 by
Burleson. All rights reserved.
Oracle® is the registered trademark
of Oracle Corporation.