Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Access v$system_event so slowly.
I am writing a tool to repeatly display the v$system_event information
(the changed value), I try to display it every 5 seconds, but the query
need to run 2-3 seconds, v$system_event have only about 400 rows.
When I access v$SQL, it's faster than the v$system_event.
SELECT /* OPMON WAIT EVENT */ /*+ rule */
n.name, nvl(e.total_waits,0) waits, nvl(e.time_waited,0) wtime FROM V$SYSTEM_EVENT e, V$EVENT_NAME N WHERE N.NAME = E.EVENT(+) AND N.NAME NOT LIKE '%timer' AND N.NAME NOT LIKE 'rdbms%message%' AND N.NAME NOT LIKE '_ull event' AND N.NAME NOT LIKE 'SQL*Net%message%client' AND N.NAME NOT LIKE 'client%message' AND N.NAME NOT LIKE '%Idle Wait' AND N.NAME NOT LIKE '%idle wait' AND N.NAME NOT LIKE 'lock%manager%remote%message' AND N.NAME NOT LIKE '%slave wait' AND N.NAME NOT LIKE '%Slave Wait' AND N.NAME NOT LIKE 'PX Deq%' AND N.NAME NOT LIKE 'wakeup%' AND N.NAME NOT LIKE 'Queue Monitor%' AND N.NAME NOT LIKE 'pipe get' AND N.NAME NOT LIKE '%remote%message' AND N.NAME NOT LIKE '%queue%message%' AND N.NAME NOT LIKE '%wait%message%' AND N.NAME <> 'knlqdeq' UNION ALL SELECT 'CPU time',0,VALUE FROM V$SYSSTAT WHERE NAME='CPU used by this session'Received on Wed Sep 21 2005 - 05:33:56 CDT