2006 May 03 12:51 PM
hi all,
In a program how to check performance of SQL statment and which particular table is taking more time in execution
thanks
Message was edited by: soorya m
2006 May 03 12:53 PM
Switch the trace (ST05) on, run your program and then look at trace in ST05 which should give you time taken by each block of your program.
Regards,
Ravi
Note : Please mark the helpful answers
2006 May 03 12:55 PM
2006 May 03 12:56 PM
hai,
goto se30 transaction and give the report name and run the transaction and then sort it by net time and select the line and click on source code button it will show you the select query taking lot of time.
cheers
2006 May 03 12:58 PM
2006 May 03 1:00 PM
Hi,
using SQL trace ST05 , activate the Trace , then run the Program , after running the program swith off the trace.
then analyze the trace.
Regards
vijay
2006 May 03 1:01 PM
2006 May 03 2:10 PM
Hi Soorya,
1. You can use Tcode <b>ST05</b> to do SQL Trace . This will straight away give you the detailed analysis regarding the performance of your sql query.
2. You can use t-code <b>SE30 .</b> This is for Run time analysis. This will highlight on the tables whihc have been affected the most . and they will suggest how much load is there on the databse while fetching the data .
3. There is also one another tool called SAP Code Inspector . T-code for this is <b>SCI</b>. Here you can give you program name and straight away check your program.
The code inspector will give you a detailed analysis of all the sql statements and about their effectiveness .
You can check your program using SCI straight away :
<b>Program - > Check - > Code Inspector.</b>
Regards,
Kunal.
2006 May 03 2:53 PM
hi kunal,
in which version this SCI will work
i work in 4.6 b.it is not working
thanks
regrads
soorya
2006 May 03 3:02 PM
Hi Soorya,
SCI : That is SAP Code inspector works both in SAP Version 4.6 and 4.7 .
However , in 4.6 you will have to use <b>t-code SCI</b> to use this tool.
And in 4.7, you can run this directly also :
Program -> Check - > Code Inspector.
It will give you the detailed analysis of your program.
If you give me your email id , i wil send you some good doc on SCI.
Regards,
Kunal.
2006 May 03 3:05 PM
hi kunal ,
my id raajesh_it@hotmail.com
regrads
soorya
2006 May 03 3:08 PM
Hi soorya,
I guess SCI works in 4.6C n above..
There are other performance trancation like ST05..
have a look at it..
It will give the database usage..
Try to get database time lowest..
Regards,
Tanveer.
Please mark helpful answers.
2006 May 03 3:11 PM
HI KUNAL,
ITS NOT OPENING IN 4.6 B
R U SURE IT WILL WORK IN 4.6B
2006 Jun 01 4:45 PM
2007 Aug 28 4:41 PM
Hi Soorya,
For using of STAD Transation we can find out the exact Table which is performing poor (Give the Program name in the STAD).
Also goto ST04N->Resource consumption->Table Access Monitor, and put the filter on the table, double click on that statement. In that new window the no. of statements will open (For example: Insert, Select, Delete, Update Statements) check which statement is taking high disk reads and high buffer gets, check the Execution Plan for the SQL Statement(In that check whether the Table is using the Correct Index or not) and also check the Call Point in ABAP Program.
Here definetly you will find the Solution.
Best Regards,
Sudhakar
2006 May 03 2:51 PM
hi friends,
we can't run print program in se30 so in that case how to check .apart from trace any method available
thanks
regrads
soorya
2006 May 03 3:03 PM
Run the program with the performance trace on (ST05). After the program completes, turn the trace off and look at the trace file. You'll see the results of each of the SQL statements. There should be some that are taking longer. Use the 'explain' function on any of the longer ones to get the details of how the statement worked. It should tell you if it used an index and if so, which one.
In my opinion ST05 is the bets performance tool.
rob