The RECOMP_PARALLEL procedure is used to recompile invalid data program units (such as packages, procedures, functions, triggers, etc.) in a multi-threaded parallel manner.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
UTL_RECOMP.RECOMP_PARALLEL(
threads IN PLS_INTEGER DEFAULT NULL,
schema IN VARCHAR2 DEFAULT NULL,
flags IN PLS_INTEGER DEFAULT 0);
Parameters
| Parameter | Description |
|---|---|
| threads | The number of threads for compilation. |
| schema | The schema of the objects to be compiled. If this parameter is NULL, all objects in the tenant are compiled. If this parameter is not NULL, only the objects in the specified schema are compiled. |
| flags | This parameter is effective only when a table with the same name exists. The value 512 indicates that if a table with the same name exists in the SYS tenant, it will be directly used. The value 1024 indicates that if a table with the same name exists, it will be dropped and automatically recreated. The default value is 0 (optional), which has no special meaning. |
Examples
Recompile all objects using 4 parallel threads.
obclient> EXECUTE UTL_RECOMP.RECOMP_PARALLEL(4);
Query OK, 1 row affected (23.463 sec)
