neodash icon indicating copy to clipboard operation
neodash copied to clipboard

Auto-prefix all read queries with a parallel runtime statement

Open nielsdejong opened this issue 2 years ago • 3 comments

As of the latest Neo4j version, we support a parallel runtime which greatly speeds up Cypher queries. We can probably help our users by automatically adding the runtime prefix in front of their queries:

CYPHER runtime = parallel

A caveat is that this throws an error for write queries, which may occur in NeoDash. So we have two options:

  • Enable the parallel runtime prefix by default, but have it be disabled in the advanced settings.
  • Disable the prefix by default, but have it optionally enabled in the advanced settings.

nielsdejong avatar Nov 15 '23 08:11 nielsdejong

image Draft of a design to enable the parallel runtime in the card settings.

As a final alternative we can also completely ignore a manual setting, and try any query with parallel runtime (prefix with EXPLAIN, see if it passes) This is a very low cost operation.

nielsdejong avatar Mar 19 '24 11:03 nielsdejong

It will also error when parallel runtime is not enabled or the query is not supported in parallel runtime

jexp avatar Mar 19 '24 13:03 jexp

I would enable by default and handle the error case behind the scenes and perhaps remember for that query (if it's not changed)

jexp avatar Mar 19 '24 13:03 jexp