Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: statspack
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.orgReceived on Tue Jan 30 2007 - 10:51:16 CST
![]() |
![]() |