Note
This view is available starting with V4.2.3.
Overview
The V$OB_SESSION_PS_INFO view displays the PS information opened by all sessions in the current OBServer tenant.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | OBServer IP |
| SVR_PORT | bigint(20) | NO | OBServer PORT |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| PROXY_SESSION_ID | bigint(20) unsigned | NO | Session ID in ODP |
| SESSION_ID | bigint(20) unsigned | NO | For V4.2.x versions:
|
| PS_CLIENT_STMT_ID | bigint(20) | NO | The PS ID returned to the client after the client sends a Prepare request. |
| PS_INNER_STMT_ID | bigint(20) | NO | Internal PS ID in OBServer (PS ID in PS Cache) |
| STMT_TYPE | varchar(256) | NO | Statement type of the prepared statement. Valid values:T_SELECT,T_INSERT,T_REPLACE,T_DELETE,T_UPDATE,T_MERGE,T_EXPLAIN,T_CREATE_TABLE,T_DROP_TABLEand so on. |
| PARAM_COUNT | bigint(20) | NO | Number of PS parameters |
| PARAM_TYPES | longtext | NO | List of parameter types. The list of types for all parameters in the prepared statement, where each type is represented by a number and different types are separated by commas. |
| REF_COUNT | bigint(20) | NO | ps_session_info_The reference count of the object,ps_session_info_is an attribute on a session. After a session prepares a statement, aps_session_info_. |
| CHECKSUM | bigint(20) | NO | String checksum of parameterized SQL in PS cache |
The following table describes the parameter types and their corresponding values for the PARAM_TYPES field in the view.
Parameter type |
Values |
|---|---|
| MYSQL_TYPE_DECIMAL | 0 |
| MYSQL_TYPE_TINY | 1 |
| MYSQL_TYPE_SHORT | 2 |
| MYSQL_TYPE_LONG | 3 |
| MYSQL_TYPE_FLOAT | 4 |
| MYSQL_TYPE_DOUBLE | 5 |
| MYSQL_TYPE_NULL | 6 |
| MYSQL_TYPE_TIMESTAMP | 7 |
| MYSQL_TYPE_LONGLONG | 8 |
| MYSQL_TYPE_INT24 | 9 |
| MYSQL_TYPE_DATE | 10 |
| MYSQL_TYPE_TIME | 11 |
| MYSQL_TYPE_DATETIME | 12 |
| MYSQL_TYPE_YEAR | 13 |
| MYSQL_TYPE_NEWDATE | 14 |
| MYSQL_TYPE_VARCHAR | 15 |
| MYSQL_TYPE_BIT | 16 |
| MYSQL_TYPE_COMPLEX | 160 |
| MYSQL_TYPE_ARRAY | 161 |
| MYSQL_TYPE_STRUCT | 162 |
| MYSQL_TYPE_CURSOR | 163 |
| MYSQL_TYPE_OB_TIMESTAMP_WITH_TIME_ZONE | 200 |
| MYSQL_TYPE_OB_TIMESTAMP_WITH_LOCAL_TIME_ZONE | 201 |
| MYSQL_TYPE_OB_TIMESTAMP_NANO | 202 |
| MYSQL_TYPE_OB_RAW | 203 |
| MYSQL_TYPE_OB_INTERVAL_YM | 204 |
| MYSQL_TYPE_OB_INTERVAL_DS | 205 |
| MYSQL_TYPE_OB_NUMBER_FLOAT | 206 |
| MYSQL_TYPE_OB_NVARCHAR2 | 207 |
| MYSQL_TYPE_OB_NCHAR | 208 |
| MYSQL_TYPE_OB_UROWID | 209 |
| MYSQL_TYPE_ORA_BLOB | 210 |
| MYSQL_TYPE_ORA_CLOB | 211 |
Sample query
Query the PS information opened by all sessions in the current OBServer tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SESSION_PS_INFO;
The query result is as follows:
+---------------+----------+-----------+------------------+------------+-------------------+------------------+-----------+-------------+-------------+-----------+------------+
| SVR_IP | SVR_PORT | TENANT_ID | PROXY_SESSION_ID | SESSION_ID | PS_CLIENT_STMT_ID | PS_INNER_STMT_ID | STMT_TYPE | PARAM_COUNT | PARAM_TYPES | REF_COUNT | CHECKSUM |
+---------------+----------+-----------+------------------+------------+-------------------+------------------+-----------+-------------+-------------+-----------+------------+
| xx.xx.xx.xx | 17119 | 1010 | 0 | 3221625481 | 1 | 3 | T_SELECT | 3 | 3, 15, 5 | 1 | 1817423648 |
+---------------+----------+-----------+------------------+------------+-------------------+------------------+-----------+-------------+-------------+-----------+------------+
