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

How to test the select statement.

Former Member
0 Likes
3,146

Hi All,

How to test the select statement.

Is there any Oracle sqlplus or toad kind of tool to test the query.

thanks

siva

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,759

Hi,

you can check it in the debugging mode.

(or)

you can use se30 tcode.. which will help you to check select stmt performance.

Regards,

venkat

6 REPLIES 6
Read only

Former Member
Read only

Former Member
0 Likes
1,759

Hi,

Write the select statement, and check it in debug mode.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,759

Hi Siva,

You can use the debugging option to check the SELECT Statement. To check the contents of the table into which the data was selected, write a STOP after Select and keep a breakpoint on STOP. Remember to remove the STOP statement after checking the contents of the table.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,759

hi,

The Best way for testing the SELECT statement is to switch the debugger on.

Here you can find all the entries which are extracted by your seelct Query and also the conditions you have applied will be fulfilled or not.

Regards

Sumit Agarwal

Read only

SureshRa
Active Participant
0 Likes
1,759

Use SQL Trace (ST05) and choose 'Explain one SQL Request'. Enter your SQL command as it should be executed in the underlying database. e.g. if the db is Oracle, the statement should be entered as:

SELECT matnr,werks,lvorm,dispo

FROM marc

WHERE mandt = :a AND

matnr = 😛 AND

werks = :c

In the above :a, 😛 and :c are place holders for the actual comparison values. You dont have to enter those values. When you choose 'Explain' button, you will find the 'Execution Plan'. The important parameter which denotes the efficiency of the SQL statement is the 'Cost'. The cost should be as low as possible. The table access should be through INDEX UNIQUE SCAN. If you get a FULL TABLE SCAN and higher cost, you need to fine-tune your statement by modifying the where clause.

If you dont know Oracle SQL statements, execute the program in trace mode and go to the trace and you will find the underlying SQL statements issued to the database.

Regards

Suresh Radhakrishnan

Read only

Former Member
0 Likes
1,760

Hi,

you can check it in the debugging mode.

(or)

you can use se30 tcode.. which will help you to check select stmt performance.

Regards,

venkat