Application Development and Automation 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: 
Read only

SQL at the backed and execution plan

Former Member
0 Likes
670

Hi,

I am pretty new to ABAP but can see that it provides a lot of useful ways to retrieve data, etc. Looking at all this nifty functionality, I was wondering if there is a way to find out what SQL statements are executed at the DB level?

I have tried to look at ST05 but am not sure if I see the exact statement being fired on the backend. We have an Oracle DB and was wondering if we can get the execution plan and cost factors for these queries at the DB level.

All help appreciated.

M

Hi,

I am pretty new to ABAP but can see that it provides a lot of useful ways to retrieve data, etc. Looking at all this nifty functionality, I was wondering if there is a way to find out what SQL statements are executed at the DB level?

I have tried to look at ST05 but am not sure if I see the exact statement being fired on the backend. We have an Oracle DB and was wondering if we can get the execution plan and cost factors for these queries at the DB level.

All help appreciated.

M

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
640
Read only

0 Likes
640

Hi Raymond,

Thank you so much for replying to so quickly. These notes are really very useful. Basically here is my example, if you might say:

SELECT

/*+

  FIRST_ROWS (5)

*/

  *

FROM

  "ZMDLFA1"

ORDER BY

  "ZLIFNR"

This SQL statement is what I see in the trace on ST05 and also on ST04. Now what I am really after is the statement that is actually being executed on the backend DB.

So my question is:

Is it at all possible to get that? If yes, how?

Hope I have explained myself.

M

Read only

0 Likes
640

I hope this is pasted from the tab 'Explain'. This is the actual SQL query that is getting executed.

Read only

0 Likes
640

Yes the EXPLAIN tab display the actual SQL request from SAP to Oracle and Oracle strategy to get the data, for more information on ST05, read Performance Analysis, SQL Trace Analysis, Example Explanation of an Oracle Statement.

Also on Oracle, try transaction TAANA, there you can analyze data distribution of a database table (Table Analysis, Perform check)

Regards,

Raymond