Oracle PL/SQL Language Pocket Reference, 4th Edition
by Steven Feuerstein, Bill Pribyl, Chip Dawes
Compilation
PL/SQL compilation is an area that has seen several improvements in recent database versions. These capabilities include conditional compilation, informational warnings, optimization, and compilation to native code.
Compiling Stored PL/SQL Programs
The following keywords are available when creating stored programs:
- OR REPLACE
Used to rebuild an existing program unit, preserving privileges granted on it.
- AUTHID
Defines whether the program will execute with the privileges of, and resolve names like, the object owner (DEFINER), or as the user executing the function (CURRENT_USER). The default AUTHID is DEFINER. See the section "Privileges and Stored PL/SQL" for additional information.
- DETERMINISTIC
Required for function-based indexes. A function is DETERMINISTIC if it always returns the same value when called with the same parameters. Deterministic functions do not meaningfully reference package variables or the database. The built-in INITCAP is deterministic, but SYSDATE is not.
- PARALLEL_ENABLED [(PARTITION in_parm BY {ANY HASH | RANGE}) ]
Tells the optimizer that a function is safe for parallel execution. The PARTITION BY clause is available only to functions that have a REF CURSOR IN parameter. This clause is used with table functions and tells the optimizer how the input can be partitioned.
- PIPELINED
Used with table functions. Specifies that the results of this table function should be returned iteratively via the PIPE ROW statement. A pipelined function can start to return data ...