Thinking Out Loud

April 21, 2008

ADDM report from SQL*Plus

Filed under: oracle — mdinh @ 2:14 am

I have generated ADDM report from SQL*Plus using: @?/rdbms/admin/addmrpt.sql

Here is a recommendation from the report.

RECOMMENDATION 2: SQL Tuning, 4.8% benefit (54 seconds)
  ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID "bunssq950snhf".
  RELEVANT OBJECT: SQL statement with SQL_ID bunssq950snhf and
  PLAN_HASH 2694099131
         insert into wrh$_sga_target_advice   (snap_id, dbid, instance_number,
         SGA_SIZE, SGA_SIZE_FACTOR, ESTD_DB_TIME, ESTD_PHYSICAL_READS)  select
         :snap_id, :dbid, :instance_number,    SGA_SIZE, SGA_SIZE_FACTOR,
         ESTD_DB_TIME, ESTD_PHYSICAL_READS  from    v$sga_target_advice
  RATIONALE: SQL statement with SQL_ID "bunssq950snhf" was executed 35
         times and had an average elapsed time of 1.5 seconds.

How do I get the plan for the SQL as seen in Enterprise Manager?
This can be done by passing the SQL_ID to dbms_xplan.display_cursor

 

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: