neodash
neodash copied to clipboard
Auto-prefix all read queries with a parallel runtime statement
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.
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.
It will also error when parallel runtime is not enabled or the query is not supported in parallel runtime
I would enable by default and handle the error case behind the scenes and perhaps remember for that query (if it's not changed)