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

From: Taral Desai <taral.desai_at_gmail.com>
Date: Thu, 24 Jan 2013 09:45:54 -0600
Message-ID: <CAO4+9HUMJR+GJ9J45LC2m2CKk7t4scwZmLBRs4DuuSh09FX0Cg_at_mail.gmail.com>



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_at_parallon.net> 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
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 

Thanks & Regards,
Taral Desai


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 24 2013 - 16:45:54 CET

Original text of this message