Most frequently used queries [message #53989] |
Wed, 23 October 2002 03:12 |
megha
Messages: 2 Registered: October 2002
|
Junior Member |
|
|
Can anybdy let me know the most frequently used queries in the database. Which view/taqble to query and which cols and a description of that
thanks
megha
|
|
|
|
|
Re: Most frequently used queries [message #53997 is a reply to message #53989] |
Wed, 23 October 2002 05:36 |
puneet
Messages: 76 Registered: August 2002
|
Member |
|
|
yup it will give u most frequent used queries , run time load time etc etc just describe the view u will come to know .. also if u need some other data too like user etc the u can form a join wwith v$sessions etc in your case just v$sqlarea query will be enough i guess...
|
|
|
Re: Most frequently used queries [message #53999 is a reply to message #53989] |
Wed, 23 October 2002 05:56 |
Vikas Gupta
Messages: 115 Registered: February 2002
|
Senior Member |
|
|
You can query the v$sqlarea view.
Check the following columns:
sql_text
loads (no. of times the query had to be reloaded)
executions ( no. of times the query had been executed)
disk_reads
buffer_gets
Loads should be less because parsing it an expensive operation.
|
|
|
Re: Most frequently used queries [message #54149 is a reply to message #53989] |
Thu, 31 October 2002 15:56 |
Tommy Petersen
Messages: 5 Registered: October 2002
|
Junior Member |
|
|
The SQLArea will only hold the most recently used queries, if you have a small SQL Area you may not see everything you want. A better way is to set trace on at the system level and then run TKPROF, you can then sort the output by number of executions,number of I/Os and many other. Not only can you find the most frequently used queries, but also the most expensive queries.
|
|
|