Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to Analyze the TKPFOF output !!!

Status
Not open for further replies.

Striker99

Programmer
Oct 31, 2001
34
UA
All,

I am relatively new to DBA activities. Is there any best way to analyze the TKFROF output to identifly any SQL's that need tuning.

Please let me know asap.

Thanks,
striker99
 
the 'best' way to find bad SQL is to look in your cache for SQL that has done LOTS of Disk I/O or SQL that has done LOTS of SGA reads. (the first needs indexes, the sacond needs better indexes)

select hash value,
disk_reads,
Buffer_gets,
sorts,
Executions,
loads,
from v$sqlarea
Where disk_read > 50,000
order by disk_reads

you change the where and order by to suit the 'badness' you are looking for, how you have a list of hash values who are 'bad'.

now to find each statement

select hash_value,
Piece,
Sql_text
from v$sqltext
where hash_value = &number
order by 1,2

The one thing you can't give for your heart's desire is your heart. - Lois McMaster Bujold
 

You can try:

tkprof trc_file out_file explain=usr/pwd sort=exeela,execpu

Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top