2010 Oct 20 8:40 AM
The below query is taking a long time to process in the background aswell.
SELECT strt_code
city_code
commu_code
regiogroup
into TABLE gt_adrstreet1
FROM adrstreet
FOR ALL ENTRIES IN gt_street_district
WHERE strt_code EQ gt_street_district-strt_code.
We are planning to use the parallel processing to avoid the long runtime.
CALL FUNCTION - STARTING NEW TASK parameter_list
Can you please let me know as to how can I use the above call function and Is this the good possibility to use??
Thanks in advance.....
2010 Oct 21 12:40 PM
Hello Gayatrii,
Hope you are checking gt_street_district[] is initial or not before select statement because if it is initial then select will
fetch all the entries.
There are many ways to solve this problem first I will suggest to checkrun time analysis of this query using ST05.
This will give you idea as how query is performing currently. May be you can tune it more to increase the performance.
Other ways to solve this is you can spin multiple background jobs and make use of package size in select statement.
For example:
JOB1 Package size 50000 starting from 1 to 50000
JOB2 Package size 50000 starting from 50001 to 100000
In this case both jobs will run parallel to each other and fetch different set of data.
So you need to implement packaging logic for example for first job select will start on row 1 and also it will return that data to output but for second JOB select will skip first package i.e. data rows from 1 to 50000 as those are already sent out by JOB1
So it will go for second package fetch and return next 50000.
Write one report that has logic to spin JOB with different start and end row values.
Second report to actually take these parameter i.e. package size start and end and locate the correct package and fetch data.
Using option CALL FUNCTION - STARTING NEW TASK parameter_list is again not good idea as you problem is performance issue and it will be still there so I will suggest you go by PACKAGE SIZE option.
Hope this resolves your issue..
Thanks,
-Anand.
2010 Oct 21 12:40 PM
Hello Gayatrii,
Hope you are checking gt_street_district[] is initial or not before select statement because if it is initial then select will
fetch all the entries.
There are many ways to solve this problem first I will suggest to checkrun time analysis of this query using ST05.
This will give you idea as how query is performing currently. May be you can tune it more to increase the performance.
Other ways to solve this is you can spin multiple background jobs and make use of package size in select statement.
For example:
JOB1 Package size 50000 starting from 1 to 50000
JOB2 Package size 50000 starting from 50001 to 100000
In this case both jobs will run parallel to each other and fetch different set of data.
So you need to implement packaging logic for example for first job select will start on row 1 and also it will return that data to output but for second JOB select will skip first package i.e. data rows from 1 to 50000 as those are already sent out by JOB1
So it will go for second package fetch and return next 50000.
Write one report that has logic to spin JOB with different start and end row values.
Second report to actually take these parameter i.e. package size start and end and locate the correct package and fetch data.
Using option CALL FUNCTION - STARTING NEW TASK parameter_list is again not good idea as you problem is performance issue and it will be still there so I will suggest you go by PACKAGE SIZE option.
Hope this resolves your issue..
Thanks,
-Anand.