1

Is EXPLAIN ... a purely interactive feature, or it is possible to access its outputs from the Python driver? If the latter, how?

And, in general, how does one access programatically all the non-data information returned by a query? (stuff like Started streaming 25 records after 16 ms and completed after 17 ms.)

The docs mention profile instance variable of the ResultsSummary class which is None by default. Looking at the code I still cannot figure out how that field gets populated.

  • neo4j community 4.3.2
  • neo4j python driver 4.3.4
Tim
  • 236
  • 2
  • 8
  • Try printing the result if you put EXPLAIN in the query. Haven't tried it so it is interesting to see. – jose_bacoy Oct 28 '21 at 18:54
  • @jose_bacoy nothing useful gets returned: `data` is all blank (no records, as is consistent with what `EXPLAIN` does in Browser) and metadata fields in `summary` section are blank. – Tim Oct 28 '21 at 19:05
  • How about this doc? Will it be useful? https://neo4j.com/docs/api/java-driver/current/org/neo4j/driver/summary/ResultSummary.html. Look at ProfiledPlan profile() method. – jose_bacoy Oct 28 '21 at 19:11
  • Yeah! When you run a query with `PROFILE`, the `profile` dict of `ResultSummary` is non-empty. Thanks for the hint Questions remain: 1. What about `EXPLAIN` rather than `PROFILE`? 2. How do we access the query metadata (`Started streaming blah blah`) without invoking `PROFILE`? – Tim Oct 28 '21 at 19:15
  • 1
    will take a look... – jose_bacoy Oct 28 '21 at 19:43

0 Answers0