Skip to content

SHOW STATS

The SHOW STATS statement shows the statistics of the graph space collected by the latest STATS job.

The statistics list the following information:

  • The number of vertices and edges in the graph space
  • The number of vertices with each tag
  • The number of edges of each edge type

Prerequisites

You have successfully run the SUBMIT JOB STATS statement in the graph space you want to collect statistics. For more information, see SUBMIT JOB STATS.

NOTE: 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.

Syntax

SHOW STATS

Example

nebula> USE basketballplayer;
Execution succeeded (time spent 1075/1646 us)

--Start a `STATS` job.
nebula> SUBMIT JOB STATS;
+------------+
| New Job Id |
+------------+
| 98         |
+------------+
Got 1 rows (time spent 2058/2609 us)

--Make sure the job is finished.
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 |
+----------------+---------------+------------+------------+------------+
Got 4 rows (time spent 1233/1924 us)

--Check the statistics.
nebula> SHOW STATS;
+---------+------------+-------+
| Type    | Name       | Count |
+---------+------------+-------+
| "Tag"   | "player"   | 51    |
+---------+------------+-------+
| "Tag"   | "team"     | 30    |
+---------+------------+-------+
| "Edge"  | "like"     | 81    |
+---------+------------+-------+
| "Edge"  | "serve"    | 152   |
+---------+------------+-------+
| "Space" | "vertices" | 81    |
+---------+------------+-------+
| "Space" | "edges"    | 233   |
+---------+------------+-------+
Got 6 rows (time spent 996/1637 us)

Last update: April 13, 2021
Back to top