My Oracle Support Banner

How To Enable Parallel Query For A Function? (Doc ID 1093773.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version 10.2.0.4 and later
Information in this document applies to any platform.

Goal

Question 1:

When attempting to incorporate a PL/SQL Packaged procedure/function within parallel execution there appear to be two possible ways to flag the stored procedure/function.

Option 1 - Use the PRAGMA call.

CREATE OR REPLACE PACKAGE P1
AS
  FUNCTION F1 (x IN NUMBER) RETURN NUMBER
   PRAGMA RESTRICT_REFERENCES (compress_clob, WNDS, RNPS, WNPS);
     :
     :
     :


Option 2 - Use the PARALLEL_ENABLE clause

CREATE OR REPLACE PACKAGE P1
AS
PROCEDURE F1 (x IN NUMBER) RETURN NUMBER
PARALLEL_ENABLE
    :
    :
    :


Can either Option 1 be used, Option 2 or is both required?


Question 2:

How does the PL/SQL code implement the PARALLEL_ENABLE clause?

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.