Sort activity [message #350841] |
Fri, 26 September 2008 12:41 |
shrinika
Messages: 306 Registered: April 2008
|
Senior Member |
|
|
Hello, I am just trying to write the procedure which will run in the database to capture hit ratio,
library cache hit ratio, sort activity etc.
Here is the query i will be using. But when i google it, i see different queries in different links.
I just want to confirm this is the correct one to find out the memory sort.
SELECT ROUND((100 * b.VALUE) /DECODE ((a.VALUE + b.VALUE),
0,1,(a.VALUE + b.VALUE)),2) "Percent memory sorts"
FROM v$sysstat a,
v$sysstat b
WHERE a.name = 'sorts (disk)'
AND b.name = 'sorts (memory)'
|
|
|
|
Re: Sort activity [message #350911 is a reply to message #350849] |
Sat, 27 September 2008 08:50 |
shrinika
Messages: 306 Registered: April 2008
|
Senior Member |
|
|
Hello Michel, Thanks for getting back to me.
I wanted to know how much percentage of sorts are
happening on memory versus disk. I wanted to double check with some one before i implement this code.
I found two sql query and i am not sure which one is accurate. Please let me know which one i should use.
SELECT ROUND((100 * b.VALUE) /DECODE ((a.VALUE + b.VALUE),
0,1,(a.VALUE + b.VALUE)),2) "Percent memory sorts"
FROM v$sysstat a,
v$sysstat b
WHERE a.name = 'sorts (disk)'
AND b.name = 'sorts (memory)'
I found another one.
select round((mem.value/(mem.value+dsk.value))*100,2)from v$sysstat mem, v$sysstat dsk
where mem.name='sorts (memory)'
and dsk.name='sorts (disk)'
|
|
|
|
|