Hi,
Suppose I have 3 cursors declared within SP:
REPLACE PROCEDURE "schema"."sproc" ( IN "param" DECIMAL(25, 0))
DYNAMIC RESULT SETS 3
BEGIN
DECLARE c1 CURSOR WITH RETURN ONLY FOR
select x from schema.A where ID = param;
DECLARE c2 CURSOR WITH RETURN ONLY FOR
select y from schema.B where ID = param;
DECLARE c3 CURSOR WITH RETURN ONLY FOR
select z from schema.C where ID = param;
OPEN c1;
OPEN c2;
OPEN c3;
END;
Are these selects executed in sequence (c1 , then c2, then c3) or parallel?
Is there any difference if I move OPEN statement into declare cursor body, like in second post?
Hi,
Suppose I have 3 cursors declared within SP:
REPLACE PROCEDURE "schema"."sproc" ( IN "param" DECIMAL(25, 0))
DYNAMIC RESULT SETS 3
BEGIN
DECLARE c1 CURSOR WITH RETURN ONLY FOR
select x from schema.A where ID = param;
DECLARE c2 CURSOR WITH RETURN ONLY FOR
select y from schema.B where ID = param;
DECLARE c3 CURSOR WITH RETURN ONLY FOR
select z from schema.C where ID = param;
OPEN c1;
OPEN c2;
OPEN c3;
END;
Are these selects executed in sequence (c1 , then c2, then c3) or parallel?
Is there any difference if I move OPEN statement into declare cursor body, like in second post?