Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Performance tuning

Former Member
0 Kudos

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

16 REPLIES 16

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

check transaction ST05.

hope this help,

priya.

Former Member
0 Kudos

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

0 Kudos

just go through this link u got lots of information regarding st05

former_member188685
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

hi kunal,

in which version this SCI will work

i work in 4.6 b.it is not working

thanks

regrads

soorya

0 Kudos

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.

0 Kudos

hi kunal ,

my id raajesh_it@hotmail.com

regrads

soorya

0 Kudos

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.

0 Kudos

HI KUNAL,

ITS NOT OPENING IN 4.6 B

R U SURE IT WILL WORK IN 4.6B

0 Kudos

it is available from 4.7......

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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