。
还有其他办法(例如,通过YEAR_TABLE进行治疗并提交房舍管理司每年处理的主要工作)。 每年的工作都会将成果列入表格。
一旦完成所有 sp的工作,你就只是从桌上提取结果。
PS. I suspect parallel pipelined won t do what you want though.
I created a large table with just three rows with a specific value.
I then created a parallel pipelined function that just pushed out the SID of the executing process (see below) and the number of rows it processes.
I had an SQL that picked out those three rows, and passed that as the the cursor into the function.
Mostly the function pushed out two different SIDs (which is what EXPLAIN PLAN told me it picked as the parallelism degree). Sometimes it showed two processes had ed executed, but all three rows were processed by one of those processes.
因此,现在就没有这样的情况,即从 cur子手中夺走row子,然后转到要处理的平行奴隶,但每个平行进程都将获得一张驾驶桌的切片。 如果有小的表格,它可能不考虑平行,甚至可能只是把头50分拨到第一程序等。
CREATE OR REPLACE FUNCTION test_pp(p_source IN SYS_REFCURSOR)
RETURN TAB_CHAR_4000 PIPELINED
PARALLEL_ENABLE (PARTITION p_source BY ANY)
IS
v_num NUMBER;
BEGIN
FETCH p_source INTO v_num;
WHILE p_source%FOUND LOOP
PIPE ROW(sys_context( USERENV , SID ));
FETCH p_source INTO v_num;
END LOOP;
PIPE ROW(sys_context( USERENV , SID )|| : ||p_source%ROWCOUNT);
CLOSE p_source;
RETURN;
END test_pp;
/