Performance Tuning : How to Check Bad/Expensive SQL
Trick: Follow as below
ST04 => Detail Analysis Menu => SQL Request => (Buffer Gets >= 1000,Disk Reads >= 100)=> OK =>
=> (place cursor on 1st row of 'Buffer Gets') => Sort => SQL text is all the way to the right;
dbl click on SQL text => Explain => bdl click on lines below SELECT statement to show which
indices are used (???)
Goto ST04OLD: Click on Detail analysis Menu
Click on SQL Requests:
In the next screen given input as (Buffer Gets >= 1000,Disk Reads >= 100 and execute.
DO sort by Buffer Gets:
Topmost SQL are the Bad SQL ,double click on them and do Explain to optimize the cost.