‎2008 Apr 24 5:14 AM
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
‎2008 Apr 24 5:20 AM
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
‎2008 Apr 24 5:16 AM
Hi,
If the records are exceeding more than 1 Lakh it better to go with work Area.
Reward iF Helpfull,
Naresh
‎2008 Apr 24 5:17 AM
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.
‎2008 Apr 24 5:20 AM
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
‎2008 Apr 24 5:26 AM
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
‎2008 Apr 24 5:42 AM
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
‎2008 Apr 24 5:56 AM
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.
‎2008 May 19 10:43 AM
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.