V$SESSTAT

2025-11-14 07:33:33  Updated

Note

This view is introduced since OceanBase Database V1.4.

Purpose

The V$SESSTAT view displays an overview of session-level statistical events.

Columns

Column Type Nullable? Description
SID bigint(20) NO For V4.3.x:
  • Before V4.3.5 BP2:
    In all connection modes (direct mode/ODP mode), this field indicates the server session ID.
  • V4.3.5 BP2 and later versions:
    • In direct mode:
      This field indicates the server session ID.
    • In ODP mode:
      • When the ODP parameter client_session_id_version = 2 is set, this field indicates the client session ID.
      • When client_session_id_version = 1, this field indicates the server session ID.
CON_ID bigint(20) NO The ID of the tenant.
SVR_IP varchar(46) NO The IP address of the OBServer node where the information is stored.
SVR_PORT bigint(20) NO The port number of the OBServer node where the information is stored.
STATISTICS# bigint(20) NO The subscript of the statistical event.
VALUE bigint(20) NO The number of times that the statistical event has happened.

Sample query

Query the summary of statistical events at the session level.

obclient [oceanbase]> SELECT * FROM oceanbase.V$SESSTAT LIMIT 1\G

The query result is as follows:

*************************** 1. row ***************************
       SID: 1152921504606863376
    CON_ID: 1002
    SVR_IP: xx.xx.xx.xx
  SVR_PORT: 2882
STATISTIC#: 0
     VALUE: 0

Contact Us