LOCK_PARTITION_STATS

2024-04-19 08:42:50  Updated

The LOCK_PARTITION_STATS procedure locks statistics on a partition.

DBMS_STATS.LOCK_PARTITION_STATS (
  ownname       VARCHAR2,
  tabname      VARCHAR2,
  partname     VARCHAR2);

Parameters

Parameter Description
ownname The username. If the username is set to NULL, the current logon username is used by default.
tabname The name of the table.
partname The name of the table partition (subpartition).

Considerations

To call this procedure, you must be the owner of the table. If the object is in the sys tenant, you must be the owner of the table or have the SYSDBA privilege.

Examples

Lock the statistics on the p0 partition in the t1 table of the testUser01 user.

obclient> CALL DBMS_STATS.LOCK_PARTITION_STATS('testUser01', 't1', 'p0');
Query OK, 0 rows affected

Contact Us