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