Note
This view is available starting with V4.2.5.
Overview
Displays the SPM plan evolution information for the current tenant.
Columns
Field |
Type |
Is NULL |
Description |
|---|---|---|---|
| OWNER | varchar(128) | NO | The user who executes the evolution task. |
| RECORD_TIME | timestamp(6) | NO | The time when the evolution result was recorded. |
| SVR_IP | varchar(46) | NO | The IP address of the server that executes the evolution task. |
| SVR_PORT | bigint(20) | NO | The server port for executing the evolution task. |
| SQL_ID | varchar(32) | NO | SQL ID for executing the evolution task. |
| TYPE | varchar(32) | NO | Record type:
|
| START_TIME | timestamp(6) | YES | The start time of the evolution task. |
| END_TIME | timestamp(6) | YES | The end time of the evolution task. |
| STATUS | varchar(7) | YES | Evolution task status:
|
| NEW_PLAN_BETTER | tinyint(4) | YES | Whether the evolution plan is better. |
| EVO_PLAN_EXEC_COUNT | bigint(20) | YES | The number of times the evolution plan is executed during the evolution. |
| EVO_PLAN_CPU_TIME | bigint(20) | YES | The average CPU cost of the evolution plan during evolution. |
| BASELINE_EXEC_COUNT | bigint(20) | YES | Number of times the baseline plan is executed during the evolution period. |
| BASELINE_CPU_TIME | bigint(20) | YES | The average CPU overhead of the baseline plan during evolution. |
Sample query
View the SPM plan evolution information of the current tenant.
obclient[oceanbase]> SELECT * FROM oceanbase.DBA_OB_SPM_EVO_RESULT;
The query result is as follows:
+-----------+----------------------------+----------------+----------+----------------------------------+---------------+------------+----------+--------+-----------------+---------------------+-------------------+---------------------+-------------------+
| OWNER | RECORD_TIME | SVR_IP | SVR_PORT | SQL_ID | TYPE | START_TIME | END_TIME | STATUS | NEW_PLAN_BETTER | EVO_PLAN_EXEC_COUNT | EVO_PLAN_CPU_TIME | BASELINE_EXEC_COUNT | BASELINE_CPU_TIME |
+-----------+----------------------------+----------------+----------+----------------------------------+---------------+------------+----------+--------+-----------------+---------------------+-------------------+---------------------+-------------------+
| oceanbase | 2025-04-28 11:47:03.101173 | 172.xx.xxx.xxx | 2882 | 7F31B924FE5B551C798869E33EA756E6 | FirstBaseline | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
| info | 2025-04-28 11:44:16.538845 | 172.xx.xxx.xxx | 2882 | BAD211D504FC6E9265F28CFB3CAEF7C9 | FirstBaseline | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
| info | 2025-04-28 11:44:09.877860 | 172.xx.xxx.xxx | 2882 | C25B16E757E1DEF0EC45BCF0B758D69F | FirstBaseline | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
+-----------+----------------------------+----------------+----------+----------------------------------+---------------+------------+----------+--------+-----------------+---------------------+-------------------+---------------------+-------------------+
3 rows in set
References
View the configuration parameters in the SPM of the current tenant: DBA_SQL_MANAGEMENT_CONFIG
View the plan baseline of SQL statements in the SPM of the current tenant: DBA_SQL_PLAN_BASELINES
For more information about the SPM evolution mechanism, see Execution plan management.
