The GATHER_SYSTEM_STATS procedure is used to collect system statistics.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Syntax
DBMS_STATS.GATHER_SYSTEM_STATS();
Exceptions
| Error Code | Description |
|---|---|
| OBE-20001 | The system statistics name is invalid. |
Considerations
- You must connect to the database as the specified user or have the
SYSDBAprivilege to run this procedure.
Examples
Execute the DBMS_STATS.GATHER_SYSTEM_STATS procedure to collect system statistics, such as CPU speed, disk I/O performance, and network throughput:
BEGIN
-- Collect system statistics
DBMS_STATS.GATHER_SYSTEM_STATS();
END;
/