E9.2 ORCH: Orchestrator Data Request with BSFN Bad Performance

alfredorz

alfredorz

Reputable Poster
Hi folks,

I've done a very simple orchestrator, with a Data Request to F4101 by business unit and Putaway Zone in a list.
1715862433395.png

When I execute database query is very fast:
SELECT COUNT(*) FROM DEVDTA920P.F4100 WHERE TRIM(LMMCU) = '4800' AND LMPZON IN ('A','B','C','D','S','Z','W');

Return about 7.448 rows.
1715862472424.png

And when I execute data request only in orchestrator (removing bsfn) it's very fast (1-2 seconds):
1715862375448.png

But when I iterate over datarequest to format location it's delay a lot (170-180 sec):
1715862314159.png
1715862419242.png

How I could improve the performance?

Best regards.
 
I'm in TR22 9.2.6.3, I'm thinking about doing it in LEX but the problem I can't return array.
 
180 secs across 7400 calls of a longrunning bsfn might not be too bad :D how long is a single run of the bsfn? (you should be able to get a general sense via debug, just run a single bsfn by stepping into the loop)
 
Hi Alfredo, maybe you can use the P4100, i guess that aplication returns the location with format and for the diferents Zones, you can put it on into an array and made an iteration, if you need some help to do that, please let me now.
 
180 secs across 7400 calls of a longrunning bsfn might not be too bad :D how long is a single run of the bsfn? (you should be able to get a general sense via debug, just run a single bsfn by stepping into the loop)
Hi Dave,

For 2 records 0,374 seconds.
1715932247255.png
without bsfn 0,26 sec
1715932321985.png


I did a similar LEX, and it executed about 20 seconds (its assumible).
1715932386172.png

Thanks
 
Hi Alfredo, maybe you can use the P4100, i guess that aplication returns the location with format and for the diferents Zones, you can put it on into an array and made an iteration, if you need some help to do that, please let me now.
Thanks @BetoJDE , yeah I thought as alternative with a advance query fixed. But I'm looking as generic but I'll use to differents branchs and zones. The problem with application is that I can filter for a one zone only. But I'm surprised it took so long, with LEX reduced a lot, but with my version I can't return array (could save data in a temp work table and in orchestrator get and return data, f.ex.) and as is a list I can't include in a select (could do a iteraction depends of input parameteres).
Regards.
 
Thanks @BetoJDE , yeah I thought as alternative with a advance query fixed. But I'm looking as generic but I'll use to differents branchs and zones. The problem with application is that I can filter for a one zone only. But I'm surprised it took so long, with LEX reduced a lot, but with my version I can't return array (could save data in a temp work table and in orchestrator get and return data, f.ex.) and as is a list I can't include in a select (could do a iteraction depends of input parameteres).
Regards.
You can mantain the data request and use a form request instead of the custom request and filter for location, i guess that save you time.
 
Iterating over anything 7400+ times is going to definitely incur some significant overhead. On a newer release, this would be easy to create with a LEX when you can return an array. I think @BetoJDE is on the right track in leveraging the P4101. The appstack api has ability to include a query as part of the post. If you can dynamically create your query to filter on the branch and pick zones, and then let the p4101 format the locations for you, the performance should be much better.
 
Thanks to all! Yeah, the problem is iterator. With LEX take less, but in my version not it's possible output as array, I could use a temp table.
Finally I've done a Advance Query and it delay 15 seconds only.
Kind regards.
 
Back
Top Bottom