SHOW STATS
SHOW STATS
语句显示最近STATS
作业收集的图空间统计信息。
图空间统计信息包含:
- 点的总数
- 边的总数
- 每个标签关联的点的总数
- 每个边类型关联的边的总数
前提条件
在需要查看统计信息的图空间中执行SUBMIT JOB STATS
。详情请参见SUBMIT JOB STATS。
说明:
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" | 1606552675 | 1606552675 |
+----------------+---------------+------------+------------+------------+
| 0 | "storaged2" | "FINISHED" | 1606552675 | 1606552675 |
+----------------+---------------+------------+------------+------------+
| 1 | "storaged0" | "FINISHED" | 1606552675 | 1606552675 |
+----------------+---------------+------------+------------+------------+
| 2 | "storaged1" | "FINISHED" | 1606552675 | 1606552675 |
+----------------+---------------+------------+------------+------------+
# 显示图空间统计信息。
nebula> SHOW STATS;
+---------+------------+-------+
| Type | Name | Count |
+---------+------------+-------+
| "Tag" | "player" | 51 |
+---------+------------+-------+
| "Tag" | "team" | 30 |
+---------+------------+-------+
| "Edge" | "like" | 81 |
+---------+------------+-------+
| "Edge" | "serve" | 152 |
+---------+------------+-------+
| "Space" | "vertices" | 81 |
+---------+------------+-------+
| "Space" | "edges" | 233 |
+---------+------------+-------+