Note
For V4.4.2, this view is available starting from V4.4.2 BP4.
Overview
This view displays the execution statistics of Java UDFs for the current tenant across all OBServer nodes, including the number of calls, successes and failures, concurrency levels, time distribution, and execution time for each phase. Each Java UDF is statistically analyzed separately by function type and execution mode.
The usage instructions are as follows:
- Statistical information is only stored in memory and is reset after an OBServer node restarts.
- Each tenant retains at most 1,024 statistics on each OBServer node. When this limit is exceeded, statistics for deleted Java UDFs are evicted first, followed by those that have not been called for the longest time. The eviction or discarding of statistics does not affect the execution of Java UDFs.
- Only statistics for Java UDFs that exist in the current tenant and are accessible to the current user are displayed.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| PACKAGE_ID | bigint(20) | NO | The ID of the package to which the Java UDF belongs. |
| UDF_ID | bigint(20) | NO | The ID of the Java UDF. |
| DATABASE_ID | bigint(20) | YES | The ID of the database to which the Java UDF belongs. This parameter is NULL if the ID cannot be obtained. |
| UDF_NAME | varchar(128) | NO | The name of the Java UDF. |
| SCHEMA_STATUS | varchar(16) | NO | Schema status of Java UDF:
|
| CLASS_NAME | varchar(1024) | YES | The Java class name corresponding to the Java UDF. This parameter is NULL if it cannot be obtained. |
| ROUTINE_TYPE | varchar(32) | NO | Function type:
|
| EXECUTION_MODE | varchar(16) | NO | Execution mode:
|
| CALL_COUNT | bigint(20) unsigned | NO | Cumulative number of calls. A single vectorized batch call counts as one call. |
| ROW_COUNT | bigint(20) unsigned | NO | Cumulative number of input rows processed. |
| SUCCESS_COUNT | bigint(20) unsigned | NO | Cumulative number of successful calls. |
| FAIL_COUNT | bigint(20) unsigned | NO | Cumulative number of failed calls, including those that timed out or were interrupted. |
| TIMEOUT_COUNT | bigint(20) unsigned | NO | Cumulative Number of Timed Out Calls, Including inFAIL_COUNT. |
| INTERRUPT_COUNT | bigint(20) unsigned | NO | Cumulative number of interrupted calls (such as killed or canceled calls), including inFAIL_COUNT. |
| CURRENT_CONCURRENCY | bigint(20) | NO | The number of calls currently in progress. |
| PEAK_CONCURRENCY | bigint(20) | NO | The peak number of concurrent calls. |
| CALL_COUNT_1M | bigint(20) unsigned | NO | The number of calls made within the last minute. |
| QPS_1M | double | NO | Average number of calls per second in the last minute. |
| TOTAL_ELAPSED_US | bigint(20) unsigned | NO | The cumulative time consumed for the completed call, in microseconds. |
| AVG_ELAPSED_US | bigint(20) unsigned | YES | The average time consumed for completed calls, in microseconds. NULL if no calls are completed. |
| MAX_ELAPSED_US | bigint(20) | NO | The maximum duration of a single request, in microseconds. |
| P95_ELAPSED_US_5M | bigint(20) | YES | The P95 value of the call duration in the last 5 minutes, in microseconds. NULL if cannot be calculated. |
| P99_ELAPSED_US_5M | bigint(20) | YES | The P99 value of the call duration in the last 5 minutes, in microseconds. NULL if cannot be calculated. |
| SERIALIZE_TIME_US | bigint(20) unsigned | NO | The cumulative time consumed in converting OceanBase parameters to Java parameters or making sandbox requests, in microseconds. |
| DISPATCH_TIME_US | bigint(20) unsigned | NO | The cumulative time from input preparation completion to receiving the Java execution result or sandbox response, in microseconds. |
| JAVA_TIME_US | bigint(20) unsigned | YES | The cumulative execution time of Java code, in microseconds. NULL if unavailable. |
| DESERIALIZE_TIME_US | bigint(20) unsigned | NO | The cumulative time consumed in converting Java execution results or sandbox responses into OceanBase results, in microseconds. |
| INPUT_BYTES | bigint(20) unsigned | YES | The cumulative amount of request data sent to the sandbox process, in bytes. Only counts theSANDBOXThe execution mode. NULL when statistics cannot be collected. |
| OUTPUT_BYTES | bigint(20) unsigned | YES | Cumulative response data volume received from the sandbox process, in bytes. Only counts theSANDBOXThe execution mode. NULL when statistics cannot be collected. |
| LAST_CALL_TIME | timestamp(6) | YES | Time of the last call. |
| LAST_ERROR_CODE | bigint(20) | YES | The error code of the most recent failed call. This parameter is NULL if no error has occurred. |
| LAST_ERROR_TIME | timestamp(6) | YES | Time of the last call failure. NULL if no error has occurred. |
| STAT_START_TIME | timestamp(6) | NO | The time when this statistic started to be recorded. |
Sample query
Query the execution statistics of the top 10 Java UDFs with the highest number of calls across all OBServer nodes in the current tenant.
obclient> SELECT SVR_IP, TENANT_ID, UDF_NAME, ROUTINE_TYPE, EXECUTION_MODE, CALL_COUNT, FAIL_COUNT, AVG_ELAPSED_US, P99_ELAPSED_US_5M FROM oceanbase.GV$OB_JAVA_UDF_STATS ORDER BY CALL_COUNT DESC LIMIT 10;