cancel
Showing results for 
Search instead for 
Did you mean: 

expensive sql

Former Member
0 Kudos

Hi Experts,

I would like to ask something regarding expensive sql. How are we going to determine if there's an expensive sql present in SAP system? What are the things we need to check inorder for us to consider that it is an expensive sql?

Regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Experts,

Thanks for the replies, just a follow-up question pertaining to expensive sql. How are we going to determine if the sql statement is ok or not? What is the criteria before we considered such? What do we need to check if we want to say that the expensive sql is ok?

Regards,

Former Member
0 Kudos

Hi,

For information about how to identify expensive sql statements, please read note 766349.

Cheers!

Former Member
0 Kudos

Hi Lebron

As per BASIS point of view user will inform you that perticular tcode, or program is running slow.

So with ST05 you can activate trace for that user.

You asked-:

How are we going to determine if the sql statement is ok or not? What the criteria before we considered such? What do we need to check if we want to say that the expensive sql is ok?

Check the trace, it will show you wrong areas in RED color. Investigate those. Check the time statement took to extract perticular record from database. Check the total time of statement.

Check SQL statement, if querry is like SELECT * FROM, its bad as its going to grab record from all fields of database.

So with all these condition you can predict that SQL statement is bad or not.

Hope this will clear your doubt

former_member209604
Active Contributor
0 Kudos

Hi Lebron,

Do you already know this book?

[SAP Performance Optimization Guide by Thomas Schneider|http://www.sap-press.de/katalog/buecher/titel/gp/titelID-1775]

SAP Press, ISBN 978-1-59229-202-8

It offers a general and detailed introduction into Performance Optimization (including SQL Statements).

Best regards,

Ruediger

Former Member
0 Kudos

Hi lebron

As Ruediger Stoecker mentioning about the early watch report this is one such method

and another one is by using the t-code ST04 which in version below ecc goto detailed analysis menu -->SQL request

in ecc versions goto ST04 -->under perfomance -->SQL statement anlysis

you will get the required details

regards

George

former_member209604
Active Contributor
0 Kudos

>

> I would like to ask something regarding expensive sql. How are we going to determine if there's an expensive sql present in SAP system? What are the things we need to check inorder for us to consider that it is an expensive sql?

Expensive SQL Statements (or at least the existence) are reported in the EarlyWatch Alert Report (EWA).