The RECOMP_PARALLEL procedure recompiles invalid data program units, such as packages, procedures, functions, and triggers, in parallel.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
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 degree of parallelism (DOP) for compilation. |
| schema | The schema to which the objects to be recompiled belong. The value NULL specifies to recompile all objects in the database. A value other than NULL specifies to recompile objects that belong to the specified schema. |
| flags | The action to take if a table with the same name already exists. If a table with the same name already exists in the sys tenant, the value 512 specifies to directly use the table, and the value 1024 specifies to directly drop the table and create a new one. The default value is 0, which is optional and has no special meanings. |
Examples
Use four parallel execution (PX) threads to recompile all objects.
obclient> EXECUTE UTL_RECOMP.RECOMP_PARALLEL(4);
Query OK, 1 row affected (23.463 sec)