DBMS_VECTOR_ADMIN

The DBMS_VECTOR_ADMIN package provides administrative interfaces for managing database configuration settings, such as modifying system parameters and performing privileged operations.

Related Topics

Summary of DBMS_VECTOR_ADMIN Subprograms

This table lists the DBMS_VECTOR_ADMIN subprograms and briefly describes them.

Table 1 *DBMS_VECTOR_ADMIN Package

Subprogram Description
GET_PARAMETER Gets the current value for the specified input parameter.
SET_PARAMETER Sets the value of the configuration parameters to facilitate the automatic IVF index rebuilds.

GET_PARAMETER

Use the DBMS_VECTOR_ADMIN.GET_PARAMETER procedure to get the current value for the specified input parameter.

Syntax

DBMS_VECTOR_ADMIN.GET_PARAMETER (
    parameter      IN  NUMBER,
    value          OUT NUMBER
);

Parameters

Table 2 GET_PARAMETER Procedure

Parameter Description
parameter The name of the parameter for which you want to get the current value.
value The current value of the specified parameter. This value is returned by the procedure.

Examples

The following is an example of retrieving and displaying the current background optimization interval setting for vector indexes:

DECLARE
  v_param_val NUMBER;
BEGIN
  DBMS_VECTOR_ADMIN.GET_PARAMETER(parameter => DBMS_VECTOR_ADMIN.VECTOR_INDEX_OPTIMIZATION_BACKGROUND_INTERVAL,
  value => v_param_val);
  DBMS_OUTPUT.PUT_LINE('parameter value = '|| v_param_val);
END;
/
parameter value = 1800

The following is an example of retrieving and displaying the current status of background optimization for vector indexes:

DECLARE
  v_param_val VARCHAR2;
BEGIN
  DBMS_VECTOR_ADMIN.GET_PARAMETER(parameter => DBMS_VECTOR_ADMIN.VECTOR_INDEX_OPTIMIZATION_BACKGROUND, value =>
  v_param_val);
  DBMS_OUTPUT.PUT_LINE('parameter value = '|| v_param_val);
END;
/
parameter value = 2

where, the output value 2 indicates that background optimization for vector indexes is enabled globally.

SET_PARAMETER

Use the DBMS_VECTOR_ADMIN.SET_PARAMETER to set the value of the configuration parameters to facilitate the automatic IVF index rebuilds.

Syntax

DBMS_VECTOR_ADMIN.SET_PARAMETER (
    parameter      IN NUMBER,
    value          IN NUMBER
);

Parameters

Table 3 SET_PARAMETER Procedure

Parameter Description
parameter The name of the parameter for which you want to set a value.
value The value to assign to the specified parameter.

Example

The following is an example of setting the background optimization interval for vector indexes to 1800 seconds:

DECLARE
BEGIN
   DBMS_VECTOR_ADMIN.SET_PARAMETER(parameter => DBMS_VECTOR_ADMIN.VECTOR_INDEX_OPTIMIZATION_BACKGROUND_INTERVAL,
   value => 1800);
END;
/