Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

SHOW CURRENT_SESSION command

The SHOW CURRENT_SESSION command returns information about the session that is created by the current user.

The following table describes the returned information:

Column Description
id The unique ID of the session.
username The name of the user who creates the session.
client The IP address of the client that initiated the session.
schema The path of the schema in the current session. The default is /default_schema.
graph The schema path and name of the graph or temporary graph in the current session. If no graph or temporary graph is set for the current session, the value is either empty or corresponds to the schema path and name of the home graph set for the current user.
timezone The time zone set in the session. The default is UTC.
active_query The query that is currently running in the session.
start_time The time when the session was started.
update_time The time when the session was last modified. You can use SESSION SET and SESSION RESET to modify the session.

Syntax

show_current_session_command
SHOW CURRENT_SESSION

show_current_session_command ::=
    'SHOW' 'CURRENT_SESSION'

Examples

Show the current session

SHOW CURRENT_SESSION

Return:

+---------------------+----------+-------------------------------+-----------------+-------+----------+----------------------+-----------------------------+-----------------------------+
| id                  | username | client                        | schema          | graph | timezone | active_query         | start_time                  | update_time                 |
+---------------------+----------+-------------------------------+-----------------+-------+----------+----------------------+-----------------------------+-----------------------------+
| 6651732605118452306 | root     | 192.168.8.129:57952/GO/5.0.0/ | /default_schema |       | UTC      | SHOW CURRENT_SESSION | 2025-04-23T07:12:36.405000Z | 2025-04-23T07:12:36.405000Z |
+---------------------+----------+-------------------------------+-----------------+-------+----------+----------------------+-----------------------------+-----------------------------+