The GATHER_SYSTEM_STATS procedure is used to collect system statistics.
Syntax
DBMS_STATS.GATHER_SYSTEM_STATS();
Exceptions
| Error code | Description |
|---|---|
| HY000 | The system statistics name is incorrect. |
Considerations
To execute this procedure, the user must have the SUPER privilege or be the root user.
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;
/