‎2008 May 24 12:55 PM
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.
‎2008 May 24 1:02 PM
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.
‎2008 May 24 12:58 PM
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
‎2008 May 24 1:02 PM
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.
‎2008 May 24 1:25 PM
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.