Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-22-2018 07:34 PM
If yor prepare a file with a Cypher statement that includes either a
profile or explain clause and then
want to pipe that file to bin/cypher-shell, to produce the profile/explain output you must include --format verbose on the command line.
For example, when your file, mycypher.cql, contains
profile match (n:Movies) return count(n);
if you run
cat mycypher.cql | ./cypher-shell
the output will be
Plan: "PROFILE"
Statement: "READ_ONLY"
Version: "CYPHER 3.2"
Planner: "COST"
Runtime: "COMPILED"
Time: 42
DbHits: 0
Rows: 1
count(n)
0
however when running
cat mycypher.cql | ./cypher-shell --format verbose
the output will now be
+--------------------------------------------------------------------------------------+
| Plan | Statement | Version | Planner | Runtime | Time | DbHits | Rows |
+--------------------------------------------------------------------------------------+
| "PROFILE" | "READ_ONLY" | "CYPHER 3.2" | "COST" | "COMPILED" | 0 | 0 | 1 |
+--------------------------------------------------------------------------------------+
+--------------------------+----------------+------+---------+-----------+-----------+-------------+---------------------------------------+
| Operator | Estimated Rows | Rows | DB Hits | Cache H/M | Time (ms) | Identifiers | Other |
+--------------------------+----------------+------+---------+-----------+-----------+-------------+---------------------------------------+
| +ProduceResults | 1 | 1 | 0 | 0/0 | 0.019 | count(n) | 19237 |
| | +----------------+------+---------+-----------+-----------+-------------+---------------------------------------+
| +NodeCountFromCountStore | 1 | 0 | 1 | 0/0 | 0.029 | count(n) | 29320; count( (:Movies) ) AS count(n) |
+--------------------------+----------------+------+---------+-----------+-----------+-------------+---------------------------------------+
+----------+
| count(n) |
+----------+
| 0 |
+----------+
03-22-2019 10:35 AM
Is it possible to get a similar result working directly in the Neo4j Browser?
03-23-2019 09:55 AM
did you try --format verbose
?
03-23-2019 10:28 AM
@michael.hunger I as trying to do it directly in the browser command line rather than the terminal. I was talking with @mdfrenchman at work and he recommended I go through the bolt driver since you can apparently pull dbhits from there. So I am currently giving that a go.
All the sessions of the conference are now available online