Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Run HANA Stored procedure in parallel

$
0
0

Dear all,

 

I have created a stored procedure in HANA which will select the parameter "Property" into an array, iterate over this array and call a second stored procedure ("pattern_Identification") with the parameter "Property" as input parameter. As I have around 20 different "Property" parameters the procedure "pattern_Identification" is called several times sequential and makes the whole process slowly. That's why I would like to parallelize the process.

 

Please let me know how I can use HANA capability to call this stored procedure parallelly ?

 

Regards,

Matthias

 

PROCEDURE "MY_SYSTEM"."My_Project.procedures::run_Pattern_Identification" (   IN personID ALPHANUM(10)
)   LANGUAGE SQLSCRIPT  SQL SECURITY INVOKER   DEFAULT SCHEMA TEST_SYSTEM  AS
BEGIN  DECLARE property_Array VARCHAR(50) ARRAY;  DECLARE a_Length INT;  DECLARE a_Index INT;  DECLARE property VARCHAR(50);  property_Tab = SELECT DISTINCT "PROPERTY" FROM "ENVIRONMENTAL_DATA";  property_Array := ARRAY_AGG(:property_Tab.PROPERTY);  a_Length := CARDINALITY(:property_Array);  FOR a_Index IN 2 .. a_Length DO  property := :property_Array[:a_Index];  CALL "test_Project.procedures::pattern_Identification"(:property);           -- Call could be parallelly  END FOR;
END;

Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>