SHOW STATS¶
The SHOW STATS
statement shows the statistics of the graph space collected by the latest STATS
job.
The statistics include the following information:
- The number of vertices in the graph space
- The number of edges in the graph space
- The number of vertices of each tag
- The number of edges of each edge type
Prerequisites¶
You have to run the SUBMIT JOB STATS
statement in the graph space where you want to collect statistics. For more information, see SUBMIT JOB STATS.
Caution
The result of the SHOW STATS
statement is based on the last executed SUBMIT JOB STATS
statement. If you want to update the result, run SUBMIT JOB STATS
again. Otherwise the statistics will be wrong.
Syntax¶
SHOW STATS;
Examples¶
# Choose a graph space.
nebula> USE basketballplayer;
# Start SUBMIT JOB STATS.
nebula> SUBMIT JOB STATS;
+------------+
| New Job Id |
+------------+
| 98 |
+------------+
# Make sure the job executes successfully.
nebula> SHOW JOB 98;
+----------------+---------------+------------+----------------------------+----------------------------+-------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | Error Code |
+----------------+---------------+------------+----------------------------+----------------------------+-------------+
| 98 | "STATS" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
| 0 | "storaged2" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
| 1 | "storaged0" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
| 2 | "storaged1" | "FINISHED" | 2021-11-01T09:33:21.000000 | 2021-11-01T09:33:21.000000 | "SUCCEEDED" |
+----------------+---------------+------------+----------------------------+----------------------------+-------------+
# Show the statistics of the graph space.
nebula> SHOW STATS;
+---------+------------+-------+
| Type | Name | Count |
+---------+------------+-------+
| "Tag" | "player" | 51 |
| "Tag" | "team" | 30 |
| "Edge" | "follow" | 81 |
| "Edge" | "serve" | 152 |
| "Space" | "vertices" | 81 |
| "Space" | "edges" | 233 |
+---------+------------+-------+
Last update:
February 19, 2024