Re: Where does GC grab historical SQL plans from?

  • From: Hemant K Chitale <hemantkchitale@xxxxxxxxx>
  • To: rjoralist2@xxxxxxxxxxxxxxxxxxxxx
  • Date: Fri, 13 May 2011 12:33:51 +0800

If users are currently running the SQL, you can query V$SQL_PLAN or run
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(SQL_ID,CHILD_NUMBER));

Hemant K Chitale
http://hemantoracledba.blogspot.com
http://hemantscribbles.blogspot.com

sent from my smartphone
On 12 May 2011 21:57, "Rich Jesse" <rjoralist2@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Howdy,
>
> Having an issue this AM with a query and a very bad explain plan. It's odd
> that Grid Control's Top Activity can't seem to locate this SQL in history,
> considering 15+ folks are running it right now. I've had issues in the
past
> where GC gets confused with two different plans in the GUI, so I'd like to
> query the data directly.
>
> Thoughts on where GC grabs SQL history from? DBA_HIST_SQL_PLAN on the
> target DB is oddly devoid of this particular SQL.
>
> And yes, we do have Tuning and Diag packs...
>
> TIA!
> Rich
>
> --
> //www.freelists.org/webpage/oracle-l
>
>

Other related posts: