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

data base access

Former Member
0 Likes
903

Hi Experts

while working with large no of records. which would be the better method to fetch data from the database . using select endselect with work area or fetching the data into internal table... which one will work faster?

Thanks

Lakshman

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
883

Hi Lakshman,

If u have plenty of records then its better to get the Data in to internal tables first and process the internal table.

The Disadvantage of SELECT ENDSELECT is that it is a loop. For each and every record it hits the Database. Due to this the PERFORMANCE decreases.

the Efficiency depends on how many times we r hiting the database.

so if we use SELECT ENDSELECT, each and every time it hits the database to fetch the record. But where as in SELECT ... INTO TABLE <internal table> u hit the database only once and fetch all the required records and store in to ur internal table. Now u can process ur internal table for further operations

reward if helpful

raam

7 REPLIES 7
Read only

Former Member
0 Likes
883

Hi,

If the records are exceeding more than 1 Lakh it better to go with work Area.

Reward iF Helpfull,

Naresh

Read only

Former Member
0 Likes
883

Hi lakshman,

While fetching the records the better method is by using Internal Tables.

Select and endselect is also like a looping the table.

and also select endselect is obsolute.

Plz rewards points if helpful,

thanks & regards,

Ganesh.

Read only

Former Member
0 Likes
884

Hi Lakshman,

If u have plenty of records then its better to get the Data in to internal tables first and process the internal table.

The Disadvantage of SELECT ENDSELECT is that it is a loop. For each and every record it hits the Database. Due to this the PERFORMANCE decreases.

the Efficiency depends on how many times we r hiting the database.

so if we use SELECT ENDSELECT, each and every time it hits the database to fetch the record. But where as in SELECT ... INTO TABLE <internal table> u hit the database only once and fetch all the required records and store in to ur internal table. Now u can process ur internal table for further operations

reward if helpful

raam

Read only

Former Member
0 Likes
883

Hi

While fetching the data from the data base table being small number of data or large number of data it is always good and better practise to go on with the concept of work area.

As u need to fetch large number of records from the database table it is better and good to use work area for faster access

reward if useful

Read only

Former Member
0 Likes
883

Hai,

It is always better to extract data into internal table.

Otherwise , if u are using only work area , if u want to use the data in the work area in furthur part of program , how can u use it? So, it is always better to use internal table to retrieve the data from database.

If useful, reward points.

Thank you

G.V.K.Prasad

Read only

Former Member
0 Likes
883

Hi Laksham

Hi Lakshman,

Whether u hav few records or large number of records it always better to go for SELECT ... INTO TABLE <internal table> or workarea option becoz here u hit the database only once which determines ur performance also.

Also when u dnt use work area with select query or loop-endloop u get error/warnings in SLIN transaction.And the over all performnace issue increases.

Avoid using SELECT-ENDSELECT as for each record here the database is hit and the performance reduces drastically.

Hope ur confusion got cleared.

If any further query plz let me knw.

Kindly reward if helpful.

Read only

Former Member
0 Likes
883

Hi,

Select and end select will cause performance issue

Due to hitting database table for several time. Using Internal table and workarea is better than select and End select.