Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

v$diag_alert_ext v/s x$dbgalertext

940748Jun 21 2013 — edited Jul 9 2013

Hi All,

I am trying to fetch all the ORA- alert that has been created in last 5 min. My db is 11.2.0.3. I am using below query as sys...

SELECT originating_timestamp, host_address, MESSAGE_TEXT

     FROM sys.x$dbgalertext

    WHERE TRIM (component_id) = 'rdbms'

      AND MESSAGE_TEXT LIKE '%ORA-%'

      AND originating_timestamp > SYSTIMESTAMP - INTERVAL '5' MINUTE;

It is working find and output is coming in 3 to 4 sec. But I need to do the same as other user; so I used v$diag_alert_ext...

SELECT originating_timestamp, host_address, MESSAGE_TEXT

     FROM v$diag_alert_ext

    WHERE TRIM (component_id) = 'rdbms'

      AND MESSAGE_TEXT LIKE '%ORA-%'

      AND originating_timestamp > SYSTIMESTAMP - INTERVAL '5' MINUTE;

Now this query is taking time 3 to 4 minutes. I have tested on several databases with same version, all having same issue.

Please help to understand what is happening. How can I make the query faster?

--Regards,

Gourab

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2013
Added on Jun 21 2013
2 comments
2,551 views