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

From: <>
Date: Thu, 24 Jan 2013 09:58:19 -0600
Message-ID: <>

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.


From: Taral Desai [] Sent: Thursday, January 24, 2013 9:46 AM To: Taylor Christopher - Nashville
Subject: Re: DBA_HIST_SQLSTAT "oddity" - Executions & Executions_Delta = 0


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, <<>> 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



Thanks & Regards,
Taral Desai

-- Received on Thu Jan 24 2013 - 16:58:19 CET

Original text of this message