跳转至

SHOW STATS

SHOW STATS语句显示最近STATS作业收集的图空间统计信息。

图空间统计信息包含:

  • 点的总数
  • 边的总数
  • 每个 Tag 关联的点的总数
  • 每个 Edge type 关联的边的总数

前提条件

在需要查看统计信息的图空间中执行SUBMIT JOB STATS。详情请参见 SUBMIT JOB STATS

Caution

SHOW STATS的结果取决于最后一次执行的SUBMIT JOB STATS。如果发生过新的写入或者更改,必须再次执行SUBMIT JOB STATS,否则统计数据有错误。

语法

SHOW STATS;

示例

# 选择图空间。
nebula> USE basketballplayer;

# 执行 SUBMIT JOB STATS。
nebula> SUBMIT JOB STATS;
+------------+
| New Job Id |
+------------+
| 98         |
+------------+

# 确认作业执行成功。
nebula> SHOW JOB 98;
+----------------+---------------+------------+----------------------------+----------------------------+
| Job Id(TaskId) | Command(Dest) | Status     | Start Time                 | Stop Time                  |
+----------------+---------------+------------+----------------------------+----------------------------+
| 98             | "STATS"       | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
| 0              | "storaged2"   | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
| 1              | "storaged0"   | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
| 2              | "storaged1"   | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 |
+----------------+---------------+------------+----------------------------+----------------------------+

# 显示图空间统计信息。
nebula> SHOW STATS;
+---------+------------+-------+
| Type    | Name       | Count |
+---------+------------+-------+
| "Tag"   | "player"   | 51    |
| "Tag"   | "team"     | 30    |
| "Edge"  | "follow"   | 81    |
| "Edge"  | "serve"    | 152   |
| "Space" | "vertices" | 81    |
| "Space" | "edges"    | 233   |
+---------+------------+-------+

最后更新: November 24, 2021
Back to top