Introduction to wait events
The following three dynamic performance views display information about wait events:
V$SESSION_WAIT: Displays events that a session just completed waiting for or is currently waiting for.V$SYSTEM_EVENT: Displays the total number of wait events in the current tenant.V$SESSION_EVENT: Similar toV$SYSTEM_EVENT, but displays all wait events for each session.
Many wait events are associated with internal implementations and may be changed or deleted as needed.
Event types
Each wait event belongs to a specific event type. Wait events are categorized as follows:
| Event type name | Event type ID | Description |
|---|---|---|
| OTHER | 100 | Events that do not fall into other categories. |
| APPLICATION | 101 | Events caused by client code. |
| CONFIGURATION | 102 | Events caused by insufficient database or instance resources. |
| ADMINISTRATIVE | 103 | Events caused by database administrator commands. |
| CONCURRENCY | 104 | Events waiting for internal database resources. |
| COMMIT | 105 | Events related to log commits. |
| IDLE | 106 | Events where sessions are inactive and waiting for tasks. |
| NETWORK | 107 | Events related to network communication. |
| USER_IO | 108 | Events waiting for user I/O. |
| SYSTEM_IO | 109 | Events waiting for background process I/O. |
| CLUSTER | 111 | Events related to clusters. |
View waiting events
You can run an SQL statement in the sys tenant to display all waiting events and their corresponding waiting event types in alphabetical order. Here is an example:
obclient> SELECT name, wait_class FROM V$EVENT_NAME ORDER BY name;
Common wait events
| Wait event name | Description | Wait event type name | Parameter 1 | Parameter 2 | Parameter 3 |
|---|---|---|---|---|---|
| wait remove partition | Waits for the transaction module to delete a partition. | ADMINISTRATIVE | tenant_id | table_id | partition_id |
| wait end stmt | Waits for a statement to end. | CLUSTER | rollback | trans_hash_value | physic_plan_type |
| wait start stmt | Waits for a statement to start. | CLUSTER | trans_hash_value | physic_plan_type | participant_count |
| wait end trans | Waits for a transaction to commit. | COMMIT | rollback | trans_hash_value | participant_count |
| async rpc proxy condition wait | Asynchronous RPC wait event encapsulated at a higher level. | CONCURRENCY | address | - | - |
| dag worker condition wait | Wait event for a background DAG thread. | CONCURRENCY | address | - | - |
| latch: alive server tracer lock wait | Lock wait event for the OBAliveServerMap operation that manages the status of OBServer in memory. | CONCURRENCY | address | number | tries |
| latch: alloc object lock wait | Lock wait event for OceanBase malloc to manage small memory blocks. | CONCURRENCY | address | number | tries |
| latch: clog cascading info lock wait | Lock wait event for the clog replica cascading module. | CONCURRENCY | address | number | tries |
| latch: clog locality lock wait | Lock event for protecting Locality information internally in clog. | CONCURRENCY | address | number | tries |
| latch: clog task lock wait | Lock event for the log_task module in clog. | CONCURRENCY | address | number | tries |
| latch: config lock wait | Lock wait event for configuration items. | CONCURRENCY | address | number | tries |
| latch: default drw lock wait | DRWLock wait event, which is a read-write lock suitable for read-heavy scenarios. | CONCURRENCY | address | number | tries |
| latch: default mutex wait | Default MUTEX wait event. | CONCURRENCY | address | number | tries |
| latch: default recursive mutex wait | Default recursive MUTEX wait event. | CONCURRENCY | address | number | tries |
| latch: default spin lock wait | Default spin lock wait event. | CONCURRENCY | address | number | tries |
| latch: default spin rwlock wait | Default spin read-write lock wait event. | CONCURRENCY | address | number | tries |
| latch: id map node lock wait | ID Map wait event, which maps integers to pointers. | CONCURRENCY | address | number | tries |
| latch: server maintaince lock wait | Lock wait event for OBServer operations by RS. | CONCURRENCY | address | number | tries |
| latch: server status lock wait | Read-write lock wait event for server_statuses records. | CONCURRENCY | address | number | tries |
| latch: unit manager lock wait | Lock wait event for Unit Manager operations. | CONCURRENCY | address | number | tries |
| latch: zone infos rw lock wait | Lock wait event for OBZoneManagerBase operations. | CONCURRENCY | address | number | tries |
| latch: zone manager maintaince lock wait | Lock wait event for Zone Manager operations. | CONCURRENCY | address | number | tries |
| partition table updater condition wait | Condition wait event for OBUniqTaskQueue task processing. | CONCURRENCY | address | - | - |
| rebalance task mgr condition wait | Condition wait event for OBDRTaskMgr disaster recovery task processing. | CONCURRENCY | address | - | - |
| reentrant thread condition wait | Condition wait event for OBReentrantThread task processing. | CONCURRENCY | address | - | - |
| rpc session handler condition wait | Stream RPC wait event. | CONCURRENCY | address | - | - |
| th worker condition wait | Multi-tenant thread suspension wait event. | CONCURRENCY | address | - | - |
| thread idling condition wait | RootService idle thread wait event. | CONCURRENCY | address | - | - |
| sched idle | Multi-tenant thread wait event for task execution. | IDLE | wait start timestamp | - | - |
| mysql response wait client | Wait event for client response time. | NETWORK | - | - | - |
| sync rpc | Synchronous RPC wait event. | NETWORK | pcode | size | - |
| sched wait | Multi-tenant thread suspension wait event for large queries. | SCHEDULER | req type | req start timestamp | wait start timestamp |
| bloomfilter build read | Background BloomFilter data read. | SYSTEM_IO | fd | offset | size |
| db file compact read | Compaction task data read. | SYSTEM_IO | fd | offset | size |
| db file compact write | Compaction task data write. | SYSTEM_IO | fd | offset | size |
| db file index build read | Index build data read | SYSTEM_IO | fd | offset | size |
| db file index build write | Index build data write | SYSTEM_IO | fd | offset | size |
| db file migrate read | Migration data read | SYSTEM_IO | fd | offset | size |
| db file migrate write | Migration data write | SYSTEM_IO | fd | offset | size |
| memstore memory page alloc wait | The wait time triggered by write throttling in MemStore. | SYSTEM_IO | cur_mem_hold | sleep_interval | cur_ts |
| db file data read | User data read | USER_IO | fd | offset | size |
| interm result disk read | Intermediate result data read | USER_IO | fd | offset | size |
| interm result disk write | Intermediate result data write | USER_IO | fd | offset | size |
| row store disk read | SQL operator data write to disk | USER_IO | fd | offset | size |
| row store disk write | SQL operator data write to disk | USER_IO | fd | offset | size |
| build index scheduler condition wait | The wait time between two DDL tasks. | CONCURRENCY | address | - | - |
| debug sync condition wait | This event is meaningful only in the Errsim Debug mode. | CONCURRENCY | address | - | - |
| inner connection pool condition wait | The wait time for internal connection pool conditions. | CONCURRENCY | address | - | - |
| latch: bandwidth throttle lock wait | The lock wait time for bandwidth throttling. | CONCURRENCY | address | number | tries |
| latch: default bucket lock wait | The wait time for bucket lock. | CONCURRENCY | address | number | tries |
| latch: election group trace recorder lock wait | The lock for protecting Election Group Trace statistics. | CONCURRENCY | address | number | tries |
| latch: group migrate lock wait | The lock wait time for batch migration. | CONCURRENCY | address | number | tries |
| latch: group migrate task lock wait | The lock wait time for batch migration tasks. | CONCURRENCY | address | number | tries |
| latch: io queue lock wait | The lock wait time for I/O queue read. | CONCURRENCY | address | number | tries |
| latch: migrate lock wait | The lock wait time for migration. | CONCURRENCY | address | number | tries |
| latch: multi tenant lock wait | The lock wait time for multi-tenant management. | CONCURRENCY | address | number | tries |
| latch: rebuild retry list lock wait | The wait time for rebuild tasks. | CONCURRENCY | address | number | tries |
| latch: session trace recorder lock wait | The lock wait time for session trace records. | CONCURRENCY | address | number | tries |
| latch: tenant lock wait | The lock wait time for tenant management. | CONCURRENCY | address | number | tries |
| latch: timezone lock wait | The lock wait time for tenant Timezone structures. | CONCURRENCY | address | number | tries |
| oblog part mgr schema version wait | The wait time for refreshing the schema version in Liboblog. | CONCURRENCY | - | - | - |
| server object pool arena lock wait | The lock wait time for large object caching. | USER_IO | fd | offset | size |
| async commiting wait | The wait time for asynchronous commit in Clog. | COMMIT | - | - | - |
| exec inner sql wait | The wait time for inner SQL. | OTHER | wait inner sql class | inner session id | - |
| sync rpc | The wait time for synchronous RPC. | NETWORK | pcode | size | - |
| sleep: wait refresh schema | The wait time for refreshing the schema to the specified version. | CONFIGURATION | sleep_interval | schema_version | - |
| palf throttling sleep | The wait time for log thread throttling. | USER_IO | sleep_interval | - | - |
| palf read | The wait time for log thread reading logs. | SYSTEM_IO | fd | offset | size |
| palf write | The wait time for log thread writing logs. | SYSTEM_IO | fd | offset | size |
| das wait remote response | The wait time for a remote DAS task to return results during SQL distributed execution. | NETWORK | - | - | - |
| wait for network request in queue | The wait time for a request to be processed by a worker thread after the database system receives the request from a session. | NETWORK | pcode | level | priority |
| retry: insufficient px worker wait | The wait time for retry due to insufficient PX thread resources. | CONFIGURATION | degree of parallel | number of px workers required | the total number of idle PX workers currently |
| retry: wait GTS ready | retry due to waiting for GTS ready | CLUSTER | error code | ls leader addr | ls leader port |
| retry: wait replica readable | retry due to waiting for replica readable | CLUSTER | ls_id | tablet_id | - |
| retry: wait schema cache load | retry due to waiting for schema cache load | CLUSTER | error code | table id | table schema version |
| retry: wait location cache load | retry due to waiting for location cache load | CLUSTER | error | ls_id | - |
| retry: other retry wait | retry due to other reasons | CLUSTER | error | - | - |
| row lock wait | row lock wait | APPLICATION | lock holder tx id | data seq number | holder lock time |
