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 fetch taking time

Former Member
0 Likes
942

hi,

i have a query that if one has to fetch all the data from heavy tables like faglflexa or bseg the select query takes lots of time and the timeout occurs in foreground.........

what should be done in such cases to make it faster....

i have a development which requires all the data to be fetched from faglflexa and then comparison for segment is to take place ...this report takes around 2-3 hours to get execute in the background......

what approach do the standard tcodes follow when they hit the same tables......

shailendra.

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
793

Hi Sailedhra,

In this case the best way is to run the report as batch job.

Second best way is to fetch data in chunks of 1000 records using PACKAGE SIZE addition of select. This will give better performance compared to fetching all the data on huge tables like BSEG.

Another thing is select on cluster tables is always slower compared to transparent tables. In Standard programs they will use lot of optimization techniques which is not possible for us to analyze and implement the same due to tight dead lines.

There are many FMs available for replacing selects on cluster tables. Only thing is we have to search and find the appropriate one which suits our requirement.

Thanks,

Vinod.

3 REPLIES 3
Read only

Former Member
0 Likes
793

hi check this..

use the proper fields which are used and use all the primary and secondary index fields for the select data..then the data will be processed fastly ......use for all entries if there is any joins...

regards,

venkat

Read only

vinod_vemuru2
Active Contributor
0 Likes
794

Hi Sailedhra,

In this case the best way is to run the report as batch job.

Second best way is to fetch data in chunks of 1000 records using PACKAGE SIZE addition of select. This will give better performance compared to fetching all the data on huge tables like BSEG.

Another thing is select on cluster tables is always slower compared to transparent tables. In Standard programs they will use lot of optimization techniques which is not possible for us to analyze and implement the same due to tight dead lines.

There are many FMs available for replacing selects on cluster tables. Only thing is we have to search and find the appropriate one which suits our requirement.

Thanks,

Vinod.

Read only

Former Member
0 Likes
793

Hi friend,

Select statement on BSEG without proper index is going to create problem. SAP has provided index tables like BSID bsik(check all BS?? tables) which should be used to build proper key & then write select statement on BSEG.

i'll give some ideas you can try:

1 - Instead of INTO CORRESPONDING FIELDS OF TABLE try INTO TABLE (you target table must have the selected ones in first place on it's definition.

2 - If using FOR ALL ENTRIES IN, try to split it in two or 3 smaller tables.