Forum OpenACS Q&A: Re: Tools for finding slow queries?

Posted by Brian Fenton on
Never used Statspack. I use the following query to find queries that are going to the disk too much. If it returns too little/many rows, play around with the 10000 figure.

select  sql_text, disk_reads, loads, optimizer_cost,
parsing_user_id, serializable_aborts, au.username
from  v$sql, all_users au
where  disk_reads > 10000
and  parsing_user_id = au.user_id
order by disk_reads desc;