Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: statspack

Re: statspack

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 30 Jan 2007 08:51:16 -0800
Message-ID: <1170175871.317202@bubbleator.drizzle.com>


Oradba Linux wrote:
> I am trying to find out the execution plan of a SQL that was executed in
> the database about a week back. I am using sprepsql.sql. Should i watch
> out for any surprises , caveats using this. I understand that the
> execution path about a week back will not be the same as current. I want
> to actually the execution path the SQL took a week back.
> Obviously i am trying to performance tune the SQL which is behaving
> poorly now vs a week back.

What version?

With 10g, assuming no shutdown, you should be able to find the sql_id in gv$sql and then use that to run dbms_xplan.display_cursor.

demo in Morgan's Library at www.psoug.org under DBMS_XPLAN.DISPLAY_CURSOR.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Jan 30 2007 - 10:51:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US