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

Performance : DATA FETCH

Former Member
0 Likes
708

Hi,

Is that better to read data for 1000 plants and then read entries from internal table for 10 plants...

[bOR</b> Is that better to do a select on table for 10 plants ...10 times... ( because we dont know abt these 10 plants at runtime).

Which one is better for performance wise...

Regards,

Pra

Message was edited by:

Praneet

5 REPLIES 5
Read only

Former Member
0 Likes
621

hi,

in order to have better performance we must reduce the number of database hits,

in order to eliminate redundant database reads it is better to read data for 1000 plants into an internal table.

Read only

0 Likes
621

is it better to reduce no of data hits than volume of data transfer from data base...

<b>Because both things appear in performance tuning...</b>

Praneeth

Read only

0 Likes
621

If you are fetching data from databse by providing all the key fields in where clause then you can use select single statement to fetch 10 records at runtime. But if you are not providing ALL the key fields then this will have performance issue.

If you can provide max no. of key fields in select statement then selecting 1000 records from database will not take much time.

You can use ST05 to check the performance issue by coding in both the ways and then you will be the best judge to decide which method to use.

Have a look at below link:

http://help.sap.com/saphelp_nw04/helpdata/en/d1/801f96454211d189710000e8322d00/frameset.htm

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

Former Member
0 Likes
621

Hai,

Its always better to select table enries as maximun as possible at a time(select *) into an internal table and then havine a loop at that table and then read data from your actual internal table that you mensioned in the query.

It is not better to do a select on table for 10 plants ...10 times even though don’t know about these 10 plants at runtime.

Because if access database more times time will be more.

i hope it helps you.

Reward points if it helps you.

Regds,

Rama.Pammi

Read only

Former Member
0 Likes
621

yes praneet, it is better to reduce the number of database hits.

As u r hitting same table for 10 times it is not advisable, so select all the 1000 plants into internal table.