Hi:
Attention, excuse my english!!! ;)
I'm working with Oracle 9i. I've a problem. I have a query (I think is a
query) what is make working the cpu at 100%. I want to know how to
determinate which query is the problem. I'm watching the view v$sqlarea
and I see that some queries have a very big value at elapsed_time column
(see query text below).
Questions:
1. Do exists some tool what can help me to know what is the bad query ?
2. What means the big value of the elapsed_time column?
Select cpu_time/1000000000 cpu, elapsed_time/1000000000 elapsed,
ROWS_PROCESSED, sql_text,
from v$sqlarea
order by elapsed_time desc
Results (only 3 rows for the example)
------------------------------------------------------------------------
------------------------------------------------------------------------
---------------
1.88234375 18446744069.9878 2639788 SELECT SUM(MP.PAGADOCAP)
FROM MP WHERE CDGEM = :b10 AND .......
0.0184375 18446744067.9494 78 SELECT
NOMBREC(PRC.CDGEM,PRC.CDGCL,'I', 'N','','','','') as nombreC, NULL
AS.....
2.223359375 2.396141509 10456137 SELECT DIA_NOMBRE(:b1),
INICIOREAL(:b3,:b2, :b1) FROM DUAL
Regards.
ISC. Sergio Humberto Sánchez Durón
DACOMP SC
Tel. (449)915-4861
Aguascalientes, Ags
Oracle LazyDBA home page