RE: DBA_HIST_SQLSTAT "oddity" - Executions & Executions_Delta = 0

  • From: <Christopher.Taylor2@xxxxxxxxxxxx>
  • To: <taral.desai@xxxxxxxxx>
  • Date: Thu, 24 Jan 2013 09:58:19 -0600

Understood.
However, that wasn't the question. :)

I'm directly interested in the relationship between execute immediate and what 
shows up in DBA_HIST_SQLSTAT.

I'm wondering if something about execute immediate causes AWR to not record the 
executions_total/deltas accordingly.

Chris


From: Taral Desai [mailto:taral.desai@xxxxxxxxx]
Sent: Thursday, January 24, 2013 9:46 AM
To: Taylor Christopher - Nashville
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: DBA_HIST_SQLSTAT "oddity" - Executions & Executions_Delta = 0

Chris,

The best way to trace this is to get 10046 trace and see what's happening. As, 
this is ran as exec immediate then it's recursive SQL. So, sqltrace will tell 
you where it's spending time.

On Thu, Jan 24, 2013 at 7:18 AM, 
<Christopher.Taylor2@xxxxxxxxxxxx<mailto:Christopher.Taylor2@xxxxxxxxxxxx>> 
wrote:
We have the peculiar SQL statements that are executed in PL/SQL as an "execute 
immediate" for application reasons.
When I look up the SQL statement and get the SQL_ID and check DBA_HIST_SQLSTAT, 
I'm getting 0 executions for both total & delta.

For the 1 row I see in DBA_HIST_SQLSTAT I have approx. 2 minutes of execution 
time - but according to the application code that logs the execution, the 
statement took 14 minutes.

My AWR snapshots are set to 10 minute intervals and I would expect the 
statement to span multiple snapshots but it only appears once.
I've also modified my TOPNSQL = 500 and still no joy.  Could it be that execute 
immediate statements aren't captured correctly??

Anyone have any ideas/thoughts?


Chris Taylor
Oracle DBA
Parallon IT&S


--
//www.freelists.org/webpage/oracle-l




--

Thanks & Regards,
Taral Desai

--
//www.freelists.org/webpage/oracle-l


Other related posts: