Hi,
I am trying to analyze the level of parallelism of a certain procedure.
The procedure (so called aggregator) should union the outputs of many underline procedures.
the logic is a as follows -
1. declare N local variables (table types)
2. execute N procedures and get output into above local variables
3. UNION ALL the local variables into the aggregator procedure output table
- see simplified code example below for only two variables.
Could someone please advice -
1. what should be done to ensure maximum parallelism, amusing the under line procedures are optimized and read only, my main concern is to ensure that the calls to these procedures will be in parallel not sequential
2. how can I analyze that procedures were really called in parallel ? (AFAIK visualize plan is no enabled for stored procedure)
Thanks,
Yaron
Procedure definition
CREATE PROCEDURE "SAP_HRF"."DHS_AGGREGATOR" (OUT aggr_output "SAP_HRF"."sap.DHS::DHS1.OUTPUT.TYPE")
language SQLSCRIPT sql security invoker reads sql data as
Begin
--local varibles
declare lt_output_1 "SAP_HRF"."sap.DHS::DHS1.OUTPUT.TYPE";
declare lt_output_2 "SAP_HRF"."sap.DHS::DHS1.OUTPUT.TYPE";
declare lt_action_placeholder "SAP_HRF"."sap.hrf.resources.rule.model::T_SERVICE_ACTIONS_RESULT";
-- rules execution
CALL "SAP_HRF"."sap.DHS::DHS1"( lt_output_1 , lt_action_placeholder );
CALL "SAP_HRF"."sap.DHS::DHS1"( lt_output_2 , lt_action_placeholder );
-- results aggregation
aggr_output =
select * from :lt_output_1
UNION ALL
select * from :lt_output_2;
End;