This topic describes how to view statistics in the OceanBase Cloud Platform (OCP) console.
Note
Statistics management is supported only for business tables.
Feature description
The query optimizer of OceanBase Database evaluates the costs of execution plans based on the database statistics. Database statistics are closely related to query efficiency and serve as the basis for quick system response and low latency. Statistics must be updated in real time to ensure stable and efficient operation of the database system. OCP provides statistics of tables whose statistics are collected, top 10 tables with the most DML operations, statistics query, database- and table-level statistics collection, statistics collection window maintenance, and statistics collection task management. You can view, lock, and unlock statistics collection tasks to better manage and maintain the database.
Prerequisites
To view the statistics of a tenant, make sure that you have the following permissions:
- Resource Permissions: Cluster Read-only or Tenant Read-only permission
- Menu Permissions: Permission on the Statistics Management menu of Tenants
Statistics overview
In the Statistics Overview section on the Statistics Management page, you can view the total statistics of the current tenant, as well as statistics that have not been updated in a timely manner, including those that have not been updated for 1 day, 7 days, 14 days, and 30 days, respectively.
View top 10 tables with the most changes
The Top 10 Tables with Changes section displays the top 10 business tables with the most changes made by INSERT, UPDATE, DELETE, or all DML operations, respectively. You can view the name, number of changes, and statistics collection time of each table.
View the statistics table
The Statistics Table section displays all statistics in the current tenant, including the name, last update time, and status of each table. You can collect statistics on a table or lock a table. For more information, see the Collect table-level statistics section in the Collect statistics topic.