SHOW QUERIES
Note
SHOW QUERIES
从本地缓存获取当前Session中查询的状态,几乎没有延迟。
nebula> SHOW QUERIES;
+------------------+-----------------+--------+----------------------+----------------------------+----------------+-----------+-----------------+
| SessionID | ExecutionPlanID | User | Host | StartTime | DurationInUSec | Status | Query |
| 1625463842921750 | 46 | "root" | ""192.168.x.x":9669" | 2021-07-05T05:44:19.502903 | 0 | "RUNNING" | "SHOW QUERIES;" |
+------------------+-----------------+--------+----------------------+----------------------------+----------------+-----------+-----------------+
+------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+---------------------------------------------------------+
| SessionID | ExecutionPlanID | User | Host | StartTime | DurationInUSec | Status | Query |
+------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+---------------------------------------------------------+
| 1625456037718757 | 54 | "user1" | ""192.168.x.x":9669" | 2021-07-05T05:51:08.691318 | 1504502 | "RUNNING" | "MATCH p=(v:player)-[*1..4]-(v2) RETURN v2 AS Friends;" |
# 返回耗时TOP 10的查询。
nebula> SHOW ALL QUERIES | ORDER BY $-.DurationInUSec DESC | LIMIT 10;
+------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+-------------------------------------------------------+
| SessionID | ExecutionPlanID | User | Host | StartTime | DurationInUSec | Status | Query |
| 1625471375320831 | 98 | "user2" | ""192.168.x.x":9669" | 2021-07-05T07:50:24.461779 | 2608176 | "RUNNING" | "MATCH (v:player)-[*1..4]-(v2) RETURN v2 AS Friends;" |
| 1625456037718757 | 99 | "user1" | ""192.168.x.x":9669" | 2021-07-05T07:50:24.910616 | 2159333 | "RUNNING" | "MATCH (v:player)-[*1..4]-(v2) RETURN v2 AS Friends;" |
参数说明如下。