The DBMS_STATS package allows you to view and modify statistics collected by the optimizer for database objects.
Usage notes
In the current version of OceanBase Database, the DBMS_STATS package supports the following operations:
Collect statistics from the optimizer.
Set information about columns, tables, and indexes.
Delete statistics.
Lock and unlock statistics.
Subprograms
The following table describes the DBMS_STATS subprograms supported by the current OceanBase Database version.
| Subprogram | Description |
|---|---|
| DELETE_COLUMN_STATS | Deletes column-level statistics. |
| DELETE_TABLE_STATS | Deletes table-level statistics. |
| EXPORT_COLUMN_STATS | Exports column-level statistics. |
| EXPORT_TABLE_STATS | Exports table-level statistics. |
| FLUSH_DATABASE_MONITORING_INFO | Flushes the memory monitoring information of all tables to the dictionary. |
| GATHER_TABLE_STATS | Collects statistics on tables and columns. |
| IMPORT_COLUMN_STATS | Imports column-level statistics. |
| IMPORT_TABLE_STATS | Imports table-level statistics. |
| LOCK_PARTITION_STATS | Locks the statistics on a partition. |
| LOCK_SCHEMA_STATS | Locks the statistics on all tables in a schema. |
| LOCK_TABLE_STATS | Locks the statistics on a table. |
| SET_COLUMN_STATS | Sets column-level basic information. |
| SET_TABLE_STATS | Sets table-level basic information. |
| UNLOCK_PARTITION_STATS | Unlocks the statistics on a partition. |
| UNLOCK_SCHEMA_STATS | Unlocks the statistics on all tables in a schema. |
| UNLOCK_TABLE_STATS | Unlocks the statistics on a table. |