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

Redundant statements in a program

Former Member
0 Likes
1,356

Hi Gurus,

If we write two select queries in a program(or)redundant statements,with what performance tuning option we can find out it.

Regards,

Rakesh.

Hi Gurus,

If we write two select queries in a program(or)redundant statements,with what performance tuning option we can find out it.

Regards,

Rakesh.

6 REPLIES 6
Read only

matt
Active Contributor
0 Likes
1,034

Scanning the code with your eye is the most reliable method.

Read only

Former Member
0 Likes
1,034

Hi Rakesh,

you could run a ST05 trace and summarize on SQL statements. This will show how often a SQL statement has run during your trace. You find a count for each statement. If you compair the number with the number you expect, you could find the statements called to often.

Regards

Ralph

Read only

Former Member
0 Likes
1,034

Hi rakesh sarma,

when there is a need to use similar data from retrieving select statements used in different situations , you should create a temporary table and store the data retiriving in first select statement.Use this data in the temp. table where you want.it should eliminate the need of writing redundant select statement in the program.

From the performance perspective,

it took unnecessarly more time and memory it required to store the redundant data from redundant select in the program.

it consumes the memory and time resources unnecessarily.

Thank you,

Prasad G.V.K

Read only

Former Member
0 Likes
1,034

Hi,

It's better to use Global search than with what performance tuning option.

ST05 will give u the Performance of the Select but doesn't compare for redundant statements.

Read only

0 Likes
1,034

That's not exactly true. ST05 does show identical selects.

After ST05 trace, goto summarize by SQL statements. 2nd column from the left, labeled "identical" shows you the percentage of the statement which is identical.

Read only

Former Member
0 Likes
1,034

> ST05 will give u the Performance of the Select but doesn't compare for redundant statements.

as said already this is not true, it is more important to find identical execution than identical orsimilar looking coding. Only identical executions are redundant, and they can come even from the same statement.

Siegfried